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

index 7978e831e3641b523cd74ef5ababac2797c151b9..86436fcf7214d4f4f73cdf5bf185566f68372007 100644 (file)
@@ -34,13 +34,11 @@ from wtforms import (
 
 from pyramid.view import view_config
 
+import pgwui_core.forms
 import pgwui_core.utils
 from pgwui_core.core import (
     UploadEngine,
     NoTransactionEngine,
-    UserInitialPost,
-    UserWTForm,
-    CredsLoadedForm,
     SessionDBHandler,
     LogSQLCommand,
     SQLData,
@@ -65,7 +63,7 @@ log = logging.getLogger(__name__)
 
 
 @attr.s
-class CopySchemaInitialPost(UserInitialPost):
+class CopySchemaInitialPost(pgwui_core.forms.UserInitialPost):
     '''Get values from settings when there's not user-supplied values
     in POST
     '''
@@ -84,7 +82,7 @@ class CopySchemaInitialPost(UserInitialPost):
         return self
 
 
-class CopySchemaWTForm(UserWTForm):
+class CopySchemaWTForm(pgwui_core.forms.UserWTForm):
     '''The wtform used to connect to the "gombemi" db to authenticate .'''
     # We don't actually use the labels, wanting the template to
     # look (and render) like html, but I'll define them anyway
@@ -97,7 +95,7 @@ class CopySchemaWTForm(UserWTForm):
 
 
 @attr.s
-class CopySchemaForm(CredsLoadedForm):
+class CopySchemaForm(pgwui_core.forms.CredsLoadedForm):
     '''
     Acts like a dict, but with extra methods.