Hi,
On Friday, November 28, 2014 7:46:05 AM UTC-5, Tim Chase wrote:
-- As of django 1.7, the admin will redirect to a separate login page (whatever url reverse('admin:login') returns).
https://github.com/django/django/commit/be0ad62994a340ad54a0b328771931932a45a899
You could use a middleware to do an earlier, more straightforward require login.
Collin
On Friday, November 28, 2014 7:46:05 AM UTC-5, Tim Chase wrote:
On 2014-11-27 20:32, Tim Chase wrote:
> As a bit of follow-up information, if I use runserver and browse to
> the view, it redirects me to /admin/common/region/add/ but it
> displays as the login screen. Am I missing why this wouldn't do a
> redirect to my named login URL?
A careful reading of [1] suggests that the admin provides its own
login page via the login_template setting: "Path to a custom template
that will be used by the admin site login view." It apparently
renders this at the URL of the destination page rather than
redirecting to the regular (contrib.auth or some named auth-URL) and
providing a "next={{original_url}}"
Is there any way to get the admin to just use the contrib.auth login
page that I already have in place?
-tkc
[1]
https://docs.djangoproject.com/en/1.6/ref/contrib/admin/# django.contrib.admin. AdminSite.login_template
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/0e38f463-efd7-4ee7-9715-0ca42cdc6477%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment