Friday, November 28, 2014

Re: Test client to a redirect requiring a login doesn't set redirect_chain properly? [2nd follow-up]

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/20141128064754.48bc95a2%40bigbox.christie.dr.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment