Add js-page-model-attrs-items block to model attributes
Review Request #10979 — Created March 27, 2020 and submitted
This patch adds a
js-page-model-attrs-items
block to thejs-page-model-attrs
block used to pass model attributes from the Django template to JavaScript views.
Admin views that add attributes to this block have been updated to override this
block with their own attributes as the super block is currently empty. This change
will allow for the Django template to pass attributes to the view for the future
admin setup banner.
Manual verification that admin pages still render correctly.
Description | From | Last Updated |
---|---|---|
The nice thing about spaceless is that we can add newlines and such. Let's put the block/endblock on their own … |
david | |
No need for the endblock name when it's immediately after a start block. Seems inconsistent, but the main reason we … |
chipx86 | |
This shouldn't be needed in this change, since it's just redefining the same empty block from the parent template. |
chipx86 |
- Change Summary:
-
Fix spacing
- Commit:
-
7436f2cf77b501b52bfc87c4602cabefe338dd2785aaa07093157999c697f290da6debab9d15cc65
Checks run (2 succeeded)
-
This is looking great! Only one tiny thing stood out to me.
-
No need for the
endblock
name when it's immediately after a start block.Seems inconsistent, but the main reason we go for a name in
endblock
is to avoid issues when there's content within, since that content may end up introducing some new blocks that confuse things. The rule isn't so useful in these very simplistic cases.
- Change Summary:
-
Fix issue from review
- Commit:
-
85aaa07093157999c697f290da6debab9d15cc6530ca5b12102c37ef1be9187233567337cc90a9a3