Fix populating extension settings forms from defaults.
Review Request #5805 — Created May 12, 2014 and submitted
The move to
SiteSettingsForm
broke extension configuration pages
slightly. They accessed the settings object usingsettings.get(key)
, and
not throughsettings[key]
, which prevented any defaults from being
fetched.There's now a
get()
function that works just like attribute access,
returning defaults, but with the semantics of the standarddict.get()
call. This complementsset()
.
Unit test passed.
Loaded an extension config form with a blank settings dictionary and
saw the defaults used, instead of blank fields.
Description | From | Last Updated |
---|---|---|
Can you add comments for why these methods are required? |
david |
- Change Summary:
-
Added some docstrings and comments.
- Commit:
-
d7e5474c5bd1e8e9222a6122326d893da158d1f356b2f1716ccfc517c7ba28f3bb060a0c6591cf41
- Diff:
-
Revision 2 (+22)