Opened 4 years ago
Closed 4 years ago
#32564 closed New feature (wontfix)
admin/base.html : Add block "end_of_body" for JS includes
Reported by: | Thomas Güttler | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | 3.1 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I would like to add JavaScript includes at the end of the HTML, before </body>
I created a PR which implements it:
https://github.com/django/django/pull/13913
It is very simple:
<!-- END Container --> + {% block end_of_body %}{% endblock %} </body> </html>
Change History (3)
comment:1 by , 4 years ago
comment:2 by , 4 years ago
I'm definitely no expert and I haven't done any measurements, but here's a chart: https://caniuse.com/script-defer
<script src="..." defer>
seems to be enormously well supported, certainly by all browsers that are the target of Django's admin interface.
comment:3 by , 4 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
I agree with previous comments. I don't think that we need an extra block.
As per the discussion on the PR, I'd like us to establish whether this is still needed with modern browsers and
defer
andasync
&co. 🤔(It's not a big addition, so in principle, yes, but if we can do without...)
Thomas, can I ask that you do a bit of reading around?