Dear Django fellows,

using Django 1.8.3, I see that the Admin contrib uses the Auth contrib's views (in contrib/admin/sites.py). The implementation overrides the auth views' defaults only if explicitly specified in the AdminSite object.

For example, changing the user password is implemented in contrib.admin.sites.password_change() via django.contrib.auth.views.password_change which in turn by default uses template "registration/password_change_form.html", for which the Admin contrib brings a matching file.

Only for the login, which is implemented in contrib.admin.sites.login() via django.contrib.auth.views.login and which by default uses "registration/login.html", does the Admin give a different value, namely "admin/login.html" (if there was no explicit user override in the AdminSite object).

Why is the login in this regard an exception?

It seems simpler and more natural to me if the Admin used registration/login.html for logins as well.


And a related follow-up question:
Why does the Admin contrib duplicate the Auth views and URLs in the first place?

E.g. when the Admin is installed, there is URL "admin/login/", but as soon as we use our own login at settings.LOGIN_URL, there are two login pages (with different templates, see above) that serve the exact same purpose.

It seems like this makes it a bit easier getting started with the Admin, but I think it's pretty confusing later. Or am I missing / misunderstanding something?

Many thanks and best regards,
Carsten

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/55B10048.3010804%40cafu.de.
For more options, visit https://groups.google.com/d/optout.

Reply via email to