The admin login only allows staff users to login so it makes sense to me that if you wanted to add regular user login to your site, it should have separate URLs.
As for the template issue, it seems to me the admin/template/registration templates should be more like admin/login.html and namespaced under admin so that if you want to implement a non-admin password reset, you don't have a conflict in the template names (see the ticket below for an example).
https://code.djangoproject.com/ticket/20372
On Thursday, July 23, 2015 at 10:56:08 AM UTC-4, Carsten Fuchs wrote:
-- As for the template issue, it seems to me the admin/template/registration templates should be more like admin/login.html and namespaced under admin so that if you want to implement a non-admin password reset, you don't have a conflict in the template names (see the ticket below for an example).
https://code.djangoproject.com/ticket/20372
On Thursday, July 23, 2015 at 10:56:08 AM UTC-4, Carsten Fuchs wrote:
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+unsubscribe@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/5a95a816-0d1f-4117-a581-0d90d017e456%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment