1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #23993 -- Added form.media to the admin login template.

This commit is contained in:
david
2015-03-07 11:57:52 +01:00
committed by Erik Romijn
parent ec808e807a
commit 88c605e3e3
3 changed files with 7 additions and 1 deletions

View File

@@ -4,6 +4,9 @@ from django.contrib.admin.forms import AdminAuthenticationForm
class CustomAdminAuthenticationForm(AdminAuthenticationForm):
class Media:
css = {'all': ('path/to/media.css',)}
def clean_username(self):
username = self.cleaned_data.get('username')
if username == 'customform':