projects
/
pgwui_core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
410e1ba
)
Make the "locals" dict always available for local template variables
author
Karl O. Pinc
<kop@karlpinc.com>
Tue, 8 Oct 2024 16:57:49 +0000
(11:57 -0500)
committer
Karl O. Pinc
<kop@karlpinc.com>
Tue, 8 Oct 2024 16:57:49 +0000
(11:57 -0500)
src/pgwui_core/forms.py
patch
|
blob
|
history
diff --git
a/src/pgwui_core/forms.py
b/src/pgwui_core/forms.py
index b7919ec10748f6c02af9cde7ee210dc4e1386a5e..204e7d822903b4ace515b82f0848365d3e65e102 100644
(file)
--- a/
src/pgwui_core/forms.py
+++ b/
src/pgwui_core/forms.py
@@
-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