-
-
Notifications
You must be signed in to change notification settings - Fork 31.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed #35505 -- Added extrabody block to admin/base.html. #18251
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello! Thank you for your contribution 💪
As it's your first contribution be sure to check out the patch review checklist.
If you're fixing a ticket from Trac make sure to set the "Has patch" flag and include a link to this PR in the ticket!
If you have any design or process questions then you can ask in the Django forum.
Welcome aboard ⛵️!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looking good.
A few things I can immediately think of.
We should also add a note into the admin documentation that this block exists and how to override it. |
Do you have any tips where we should put this ? I mostly see template tags in the docs, but I can't seem to find anything about the blocks. |
I think the most similar documentation we have is this section: https://docs.djangoproject.com/en/5.0/ref/contrib/admin/#theming-support Perhaps we could add another section underneath it? |
Agreed, I have added the documentation in the latest change. Let me know if I need to work a bit on the wording. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything seems okay to me though I'm also not sure on the wording.
Thanks for the feedback, I improved the wording a bit to match the style of Django documentation a bit better. Let me know what you think. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @stefanivic 👍
This looks great, I have a few minor comments
|
||
{% block extra_body %}{% endblock %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{% block extra_body %}{% endblock %} | |
{% block extrabody %}{% endblock %} |
Considering we have extrastyle
and extrahead
, this should perhaps be called extrabody
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sarahboyce i was going after extra_js
but considering the extrahead
block, I agree. It's a better match.
@sarahboyce thank you for taking the time to write a great review. I agree with the proposed changes and have implemented them. Let me know what you think. Also let me know if this needs a squash. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @stefanivic 🥳 this looks great
I pushed minor tweaks 👍
Trac ticket number
ticket-35505
Branch description
The following change introduces a new template block inside the
admin/base.html
, just before the closing</body>
tag that can be used to add any code after the footer section, like custom<script>
tags.Checklist
main
branch.