mirror of
https://github.com/django/django.git
synced 2025-07-19 17:19:12 +00:00
[1.8.x] Fixed #26309 -- Documented that login URL settings no longer support dotted paths.
Backport of 2404d209a5e8c4573927e14587735562b79e13ed from master
This commit is contained in:
parent
6a9bb1447c
commit
e4be3c80a1
@ -34,6 +34,9 @@ details on these changes.
|
|||||||
* The ability to :func:`~django.core.urlresolvers.reverse` URLs using a dotted
|
* The ability to :func:`~django.core.urlresolvers.reverse` URLs using a dotted
|
||||||
Python path will be removed.
|
Python path will be removed.
|
||||||
|
|
||||||
|
* The ability to use a dotted Python path for the ``LOGIN_URL`` and
|
||||||
|
``LOGIN_REDIRECT_URL`` settings will be removed.
|
||||||
|
|
||||||
* Support for :py:mod:`optparse` will be dropped for custom management commands
|
* Support for :py:mod:`optparse` will be dropped for custom management commands
|
||||||
(replaced by :py:mod:`argparse`).
|
(replaced by :py:mod:`argparse`).
|
||||||
|
|
||||||
|
@ -2866,9 +2866,14 @@ The URL where requests are redirected after login when the
|
|||||||
This is used by the :func:`~django.contrib.auth.decorators.login_required`
|
This is used by the :func:`~django.contrib.auth.decorators.login_required`
|
||||||
decorator, for example.
|
decorator, for example.
|
||||||
|
|
||||||
This setting also accepts view function names and :ref:`named URL patterns
|
This setting also accepts :ref:`named URL patterns <naming-url-patterns>` which
|
||||||
<naming-url-patterns>` which can be used to reduce configuration duplication
|
can be used to reduce configuration duplication since you don't have to define
|
||||||
since you don't have to define the URL in two places (``settings`` and URLconf).
|
the URL in two places (``settings`` and URLconf).
|
||||||
|
|
||||||
|
.. deprecated:: 1.8
|
||||||
|
|
||||||
|
The setting may also be a dotted Python path to a view function. Support
|
||||||
|
for this will be removed in Django 1.10.
|
||||||
|
|
||||||
.. setting:: LOGIN_URL
|
.. setting:: LOGIN_URL
|
||||||
|
|
||||||
@ -2880,18 +2885,14 @@ Default: ``'/accounts/login/'``
|
|||||||
The URL where requests are redirected for login, especially when using the
|
The URL where requests are redirected for login, especially when using the
|
||||||
:func:`~django.contrib.auth.decorators.login_required` decorator.
|
:func:`~django.contrib.auth.decorators.login_required` decorator.
|
||||||
|
|
||||||
This setting also accepts view function names and :ref:`named URL patterns
|
This setting also accepts :ref:`named URL patterns <naming-url-patterns>` which
|
||||||
<naming-url-patterns>` which can be used to reduce configuration duplication
|
can be used to reduce configuration duplication since you don't have to define
|
||||||
since you don't have to define the URL in two places (``settings`` and URLconf).
|
the URL in two places (``settings`` and URLconf).
|
||||||
|
|
||||||
.. setting:: LOGOUT_URL
|
.. deprecated:: 1.8
|
||||||
|
|
||||||
LOGOUT_URL
|
The setting may also be a dotted Python path to a view function. Support
|
||||||
----------
|
for this will be removed in Django 1.10.
|
||||||
|
|
||||||
Default: ``'/accounts/logout/'``
|
|
||||||
|
|
||||||
LOGIN_URL counterpart.
|
|
||||||
|
|
||||||
.. setting:: PASSWORD_RESET_TIMEOUT_DAYS
|
.. setting:: PASSWORD_RESET_TIMEOUT_DAYS
|
||||||
|
|
||||||
|
@ -1357,6 +1357,9 @@ to ensure compatibility when reversing by Python path is removed in Django 1.10.
|
|||||||
Similarly for GIS sitemaps, add ``name='django.contrib.gis.sitemaps.views.kml'``
|
Similarly for GIS sitemaps, add ``name='django.contrib.gis.sitemaps.views.kml'``
|
||||||
or ``name='django.contrib.gis.sitemaps.views.kmz'``.
|
or ``name='django.contrib.gis.sitemaps.views.kmz'``.
|
||||||
|
|
||||||
|
If you are using a Python path for the :setting:`LOGIN_URL` or
|
||||||
|
:setting:`LOGIN_REDIRECT_URL` setting, use the name of the ``url()`` instead.
|
||||||
|
|
||||||
.. _security issue: https://www.djangoproject.com/weblog/2014/apr/21/security/#s-issue-unexpected-code-execution-using-reverse
|
.. _security issue: https://www.djangoproject.com/weblog/2014/apr/21/security/#s-issue-unexpected-code-execution-using-reverse
|
||||||
|
|
||||||
Aggregate methods and modules
|
Aggregate methods and modules
|
||||||
|
Loading…
x
Reference in New Issue
Block a user