Adding that line fixes this.
--
Ticket URL: <https://code.djangoproject.com/ticket/23993>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
How did you replace the admin authentication form? If you replace it by
overriding `AdminSite.login_form`, you can also override the
`AdminSite.login_template` attribute and set your custom login template
path.
--
Ticket URL: <https://code.djangoproject.com/ticket/23993#comment:1>
* stage: Unreviewed => Accepted
Comment:
I think it's reasonable if `{{ form.media }}` is included in the template
by default (although there is a possibility the `Media` class will be
deprecated at some point in favor of some other hook, see #22298).
--
Ticket URL: <https://code.djangoproject.com/ticket/23993#comment:2>
Comment (by Sveder):
Replying to [comment:2 timgraham]:
> I think it's reasonable if `{{ form.media }}` is included in the
template by default (although there is a possibility the `Media` class
will be deprecated at some point in favor of some other hook, see #22298).
Thanks for the reply. It is such a small fix that it is worth doing even
though Media might be deprecated. I'll submit a patch before the weekend
is over.
--
Ticket URL: <https://code.djangoproject.com/ticket/23993#comment:3>
Comment (by Sveder):
Replying to [comment:1 berkerpeksag]:
> How did you replace the admin authentication form? If you replace it by
overriding `AdminSite.login_form`, you can also override the
`AdminSite.login_template` attribute and set your custom login template
path.
That is indeed the workaround but it's not a good solution as you need to
keep updating your new "custom" login html with whatever changes happen in
Django. I think the idiomatic way to do it (for now) is using Media, and
it should work as expected. Thank you for noting the workaround though, in
case other people stumble over this.
--
Ticket URL: <https://code.djangoproject.com/ticket/23993#comment:4>
Comment (by arcturusannamalai):
@Sveder - I guess you should assign this ticket to yourself, since the
solution is part of the problem description. Good work :-)
--
Ticket URL: <https://code.djangoproject.com/ticket/23993#comment:5>
* owner: nobody => dakrauth
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/23993#comment:6>
* has_patch: 0 => 1
Comment:
Pull request https://github.com/django/django/pull/4257
--
Ticket URL: <https://code.djangoproject.com/ticket/23993#comment:7>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/23993#comment:8>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"88c605e3e34cebd5485d286a17ac84c7b8b0faf1"]:
{{{
#!CommitTicketReference repository=""
revision="88c605e3e34cebd5485d286a17ac84c7b8b0faf1"
Fixed #23993 -- Added form.media to the admin login template.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23993#comment:9>