Have a separate module for forms
authorKarl O. Pinc <kop@karlpinc.com>
Tue, 13 Aug 2024 17:07:09 +0000 (12:07 -0500)
committerKarl O. Pinc <kop@karlpinc.com>
Tue, 13 Aug 2024 17:07:09 +0000 (12:07 -0500)
src/pgwui_bulk_upload/views/bulk_upload.py

index 9269330c0be5adfa581175b31b5b8d48a1f80669..2075541caf2e319ee7c806b1aec5171b05167568 100644 (file)
@@ -32,15 +32,13 @@ import yaml
 
 from pgwui_common.view import auth_base_view
 import pgwui_core.exceptions as core_ex
+import pgwui_core.forms
 import pgwui_core.utils
 
 from pgwui_core.core import (
-    UploadNullFileWTForm,
     UploadEngine,
     ParameterExecutor,
     DataLineProcessor,
-    UploadNullMixin,
-    UploadDoubleFileForm,
     UploadData,
 )
 from pgwui_upload_core.views.upload import (
@@ -66,7 +64,8 @@ def archive_path(path):
     return os.path.join(*[os.fsdecode(part) for part in path.parts[-2:]])
 
 
-class BulkUploadForm(UploadNullMixin, UploadDoubleFileForm):
+class BulkUploadForm(pgwui_core.forms.UploadNullMixin,
+                     pgwui_core.forms.UploadDoubleFileForm):
     '''
     Acts like a dict, but with extra methods.
 
@@ -484,7 +483,7 @@ class BulkTableUploadHandler(BaseTableUploadHandler):
         Make the upload form needed by this handler.
         '''
         return BulkUploadForm().build(
-            self, fc=UploadNullFileWTForm,
+            self, fc=pgwui_core.forms.UploadNullFileWTForm,
             ip=UploadCoreInitialPost().set_component('pgwui_bulk_upload'))
 
     def get_data(self):