Following the links to the MRs in the blame view, there seems to be new no
apparent reason, for the template tag to be loaded twice, so I assume this
didn't happen on purpose and the 2nd occurrence should be removed.
--
Ticket URL: <https://code.djangoproject.com/ticket/32385>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* version: 3.0 => 3.1
--
Ticket URL: <https://code.djangoproject.com/ticket/32385#comment:1>
* easy: 0 => 1
* stage: Unreviewed => Accepted
Comment:
Good catch!
--
Ticket URL: <https://code.djangoproject.com/ticket/32385#comment:2>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/13937 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/32385#comment:3>
* owner: nobody => Tim McCurrach
* status: new => assigned
Comment:
I have created a PR for this. I had a look through the other templates in
contrib, to check for any similar instances of this. I didn't find any
duplicates but I did notice:
- `...admin/prepopulated_fields_js.html` loads `l10n` but doesn't appear
to use any l10n template tags
- `...admin/change_list_results.html` and
`...admin/edit_inline/stacked.html` loads `static` but doesn't appear to
use any static template tags
Is it okay to remove those as well, and turn this into a general template
tags clear-up ticket. Or should they go into their own ticket?
--
Ticket URL: <https://code.djangoproject.com/ticket/32385#comment:4>
Comment (by Mariusz Felisiak):
Replying to [comment:4 Tim McCurrach]:
> I have created a PR for this. I had a look through the other templates
in contrib, to check for any similar instances of this. I didn't find any
duplicates but I did notice:
>
> - `...admin/prepopulated_fields_js.html` loads `l10n` but doesn't
appear to use any l10n template tags
> - `...admin/change_list_results.html` and
`...admin/edit_inline/stacked.html` loads `static` but doesn't appear to
use any static template tags
>
> Is it okay to remove those as well, and turn this into a general
template tags clear-up ticket. Or should they go into their own ticket?
Thanks for checking this, we can remove them in the same PR:
- `l10n` is unused in `prepopulated_fields_js.html` since
d638cdc42acec608c1967f44af6be32a477c239f,
- `static` is unused in `change_list_results.html` since
f2ed107b079b050950e2fc5f2b689ca553ae12f5,
- `static` is unused in `stacked.html` since
d61ebc8fed212366340b1ed6f5d7722613801459.
--
Ticket URL: <https://code.djangoproject.com/ticket/32385#comment:5>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"a736baab92acb26eab09979143b2eafb53b957dd" a736baab]:
{{{
#!CommitTicketReference repository=""
revision="a736baab92acb26eab09979143b2eafb53b957dd"
Fixed #32385 -- Removed unused and duplicated loading of tags in admin
templates.
- `i18n` is duplicated in base.html.
- `l10n` is unused in prepopulated_fields_js.html
since d638cdc42acec608c1967f44af6be32a477c239f.
- `static` is unused in change_list_results.html
since f2ed107b079b050950e2fc5f2b689ca553ae12f5.
- `static` is unused in stacked.html
since d61ebc8fed212366340b1ed6f5d7722613801459.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32385#comment:6>