projects
/
pgwui_core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5a08be7
)
Instantiate initial form values when form is instantiated (at startup)
author
Karl O. Pinc
<kop@karlpinc.com>
Fri, 22 Jan 2021 19:14:16 +0000
(13:14 -0600)
committer
Karl O. Pinc
<kop@karlpinc.com>
Fri, 22 Jan 2021 19:14:16 +0000
(13:14 -0600)
src/pgwui_core/core.py
patch
|
blob
|
history
diff --git
a/src/pgwui_core/core.py
b/src/pgwui_core/core.py
index e6696396e7aca67147e2328a40ab67f3820d1b05..d8d487c4c181542dca2cfa9c687c1d35f8704964 100644
(file)
--- a/
src/pgwui_core/core.py
+++ b/
src/pgwui_core/core.py
@@
-187,6
+187,7
@@
class LoadedForm(collections.abc.MutableMapping):
store.update(kwargs)
self._store = store
self._fc = fc
+ self.ivals = fc.ivals(self.uh.request.registry.settings)
def __iter__(self):
for item in self._store:
@@
-215,8
+216,7
@@
class LoadedForm(collections.abc.MutableMapping):
if post:
self._form = self._fc(formdata=post)
else:
- ivals = self._fc.ivals(self.uh.request.registry.settings)
- self._form = self._fc(obj=ivals)
+ self._form = self._fc(obj=self.ivals)
def write(self, response, errors):
'''