mirror of
https://github.com/django/django.git
synced 2025-09-19 00:40:11 +00:00
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:
parent
518c582966
commit
a78dd109e6
13 changed files with 162 additions and 52 deletions
|
@ -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``
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue