Move core utility functions into a separate module
authorKarl O. Pinc <kop@karlpinc.com>
Tue, 16 Jul 2024 22:16:51 +0000 (17:16 -0500)
committerKarl O. Pinc <kop@karlpinc.com>
Tue, 16 Jul 2024 22:16:51 +0000 (17:16 -0500)
src/pgwui_develop/TEMPLATE/src/pgwui_TEMPLATE/views/TEMPLATE.py.mak

index c6ef577a52d941a2bdcef3eba796efb9c1dbd679..4ace22898f8aaceac509a4747dc79b4f22e97930 100644 (file)
@@ -22,6 +22,7 @@ from pyramid.view import view_config
 import logging
 
 import pgwui_core.core
+import pgwui_core.utils
 from pgwui_common.view import auth_base_view
 
 from ${component.lower()} import exceptions as ${short_name}_ex
@@ -48,7 +49,7 @@ def ${short_name}_view(request):
     response['pgwui']['${component.lower()}'] = settings['pgwui']['${component.lower()}']
 
     if response['report_success']:
-        if pgwui_core.core.is_checked(response['csv_checked']):
+        if pgwui_core.utils.is_checked(response['csv_checked']):
             upload_fmt = 'CSV'
         else:
             upload_fmt = 'TAB'
@@ -59,11 +60,11 @@ def ${short_name}_view(request):
                  .format(filename=response['filename'],
                          lines=response['lines'],
                          format=upload_fmt,
-                         null=pgwui_core.core.is_checked(
+                         null=pgwui_core.utils.is_checked(
                              response['upload_null']),
-                         null_rep=pgwui_core.core.escape_eol(
+                         null_rep=pgwui_core.utils.escape_eol(
                              response['null_rep']),
-                         trim=pgwui_core.core.is_checked(
+                         trim=pgwui_core.utils.is_checked(
                              response['trim_upload']),
                          db=response['db'],
                          table=response['table'],