Make the "locals" dict always available for local template variables
authorKarl O. Pinc <kop@karlpinc.com>
Tue, 8 Oct 2024 16:57:49 +0000 (11:57 -0500)
committerKarl O. Pinc <kop@karlpinc.com>
Tue, 8 Oct 2024 16:57:49 +0000 (11:57 -0500)
src/pgwui_core/forms.py

index b7919ec10748f6c02af9cde7ee210dc4e1386a5e..204e7d822903b4ace515b82f0848365d3e65e102 100644 (file)
@@ -242,8 +242,11 @@ class LoadedForm(collections.abc.MutableMapping):
         Input:
           response    Dict of results from connection execution
           errors      List of errors from connection execution
+          locals      Dict used by mako for "local variables" in templates
+                      https://docs.makotemplates.org/en/latest/runtime.html#context-variables
         '''
         response['errors'] = errors
+        response['locals'] = {}   # Template uses this for local vars
         return response