-
-
djblets/configforms/templates/configforms/config.html (Diff revision 1) Does it make sense to have a model without a view?
-
djblets/configforms/templates/configforms/config.html (Diff revision 1) If there's no js_view_class, this will be an error.
Improve creation of custom JS views and models for config pages.
Review Request #5594 — Created March 10, 2014 and submitted
ConfigPagesView
now allows for creating a custom models and views for
the configuration page, along with custom options/attributes. These will
be outputted in the template when setting up the page.A new template tag,
json_dumps_items
, helps to output data without
messing around with more expensive and messy template-based loops.
Used a custom model for the ConfigPagesView subclass, and passed data to it
and the view.Made use of the new template tag with empty and full payloads.
Change Summary:
Unconditionalized the
js_view_class
checks in the template. Users will now hit an error if they're silly and try to unsetjs_view_class
.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+58 -12) |