Fixed #15552 -- LOGIN_URL and LOGIN_REDIRECT_URL can take URLpattern names.

Thanks UloPe and Eric Florenzano for the patch, and Malcolm Tredinnick for
review.
This commit is contained in:
Carl Meyer 2012-09-08 16:55:29 -06:00
parent 518c582966
commit a78dd109e6
13 changed files with 162 additions and 52 deletions

View file

@ -947,6 +947,13 @@ The login_required decorator
(r'^accounts/login/$', 'django.contrib.auth.views.login'),
.. versionchanged:: 1.5
As of version 1.5 :setting:`settings.LOGIN_URL <LOGIN_URL>` now also accepts
view function names and :ref:`named URL patterns <naming-url-patterns>`.
This allows you to freely remap your login view within your URLconf
without having to update the setting.
.. function:: views.login(request, [template_name, redirect_field_name, authentication_form])
**URL name:** ``login``