Rename the base SQL form classes to reflect their "base" character
authorKarl O. Pinc <kop@karlpinc.com>
Tue, 24 Sep 2024 17:51:25 +0000 (12:51 -0500)
committerKarl O. Pinc <kop@karlpinc.com>
Tue, 24 Sep 2024 17:51:25 +0000 (12:51 -0500)
src/pgwui_sql/views/base.py
src/pgwui_sql/views/search_path_base.py
src/pgwui_sql/views/sql.py

index 7878ab082991d1c5a10dbb6a9d2763628c46e8e9..97197bc32299a468895758b009e4fe7b3ff9dd4a 100644 (file)
@@ -35,7 +35,7 @@ from pgwui_sql.constants import (
 
 
 @attrs.define(slots=False)
-class SQLInitialPost(pgwui_core.forms.UserInitialPost):
+class SQLBaseInitialPost(pgwui_core.forms.UserInitialPost):
     sql = attrs.field(default='')
     upload_sql = attrs.field(default=False)
     sql_file = attrs.field(default=None)
@@ -46,7 +46,7 @@ class SQLInitialPost(pgwui_core.forms.UserInitialPost):
     include_sql = attrs.field(default=True)
 
 
-class SQLWTForm(pgwui_core.forms.AuthWTForm):
+class SQLBaseWTForm(pgwui_core.forms.AuthWTForm):
     '''The wtform used to connect to the db to execute SQL.'''
     # We don't actually use the labels, wanting the template to
     # look (and render) like html, but I'll define them anyway
@@ -77,8 +77,8 @@ class SQLWTForm(pgwui_core.forms.AuthWTForm):
 
 
 @attrs.define(slots=False)
-class SQLForm(pgwui_core.forms.UploadFormBaseMixin,
-              pgwui_core.forms.AuthLoadedForm):
+class SQLBaseForm(pgwui_core.forms.UploadFormBaseMixin,
+                  pgwui_core.forms.AuthLoadedForm):
     '''
     Acts like a dict, but with extra methods.
 
index 00cc0c375df02427ca4cf7c4654882307f555482..27691c8730aa802a6239bf92b2abc7afa02ed26c 100644 (file)
@@ -30,7 +30,7 @@ from pgwui_core.constants import (
 
 
 @attrs.define(slots=False)
-class SQLEditForm(pgwui_sql.views.base.SQLForm):
+class SQLEditForm(pgwui_sql.views.base.SQLBaseForm):
     '''Always set the "action" so that the SQL gets executed
     '''
     def read(self):
@@ -72,8 +72,8 @@ class SQLEditHandler(pgwui_core.core.SessionDBHandler):
     '''
     def make_form(self):
         return SQLEditForm().build(
-            self, ip=pgwui_sql.views.base.SQLInitialPost(),
-            fc=pgwui_sql.views.base.SQLWTForm)
+            self, ip=pgwui_sql.views.base.SQLBaseInitialPost(),
+            fc=pgwui_sql.views.base.SQLBaseWTForm)
 
     def get_data(self):
         '''
index 7f85624703e9942fbf5030ef2ed790a97c199f50..0838f19095fe61f52f89d795427c78c6c429e336 100644 (file)
@@ -78,7 +78,7 @@ class SQLResultsHandler(pgwui_core.core.SessionDBHandler):
 
     Attributes:
       request       A pyramid request instance
-      uf            A SQLForm instance
+      uf            A SQLBaseForm instance
       session       A pyramid session instance
       ue
       cur
@@ -89,9 +89,9 @@ class SQLResultsHandler(pgwui_core.core.SessionDBHandler):
     tfile = attrs.field(default=None)
 
     def make_form(self):
-        return pgwui_sql.views.base.SQLForm().build(
-            self, ip=pgwui_sql.views.base.SQLInitialPost(),
-            fc=pgwui_sql.views.base.SQLWTForm)
+        return pgwui_sql.views.base.SQLBaseForm().build(
+            self, ip=pgwui_sql.views.base.SQLBaseInitialPost(),
+            fc=pgwui_sql.views.base.SQLBaseWTForm)
 
     def read(self):
         super().read()