summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlasdair Nicol <alasdair@thenicols.net>2016-03-02 15:48:13 +0000
committerTim Graham <timograham@gmail.com>2016-03-03 07:49:06 -0500
commite4be3c80a1dc948adaecaab0d32e7537c8f7e011 (patch)
tree52d7932ee8bb719dff640c04b5a9f978750559dc
parent6a9bb1447c6f11e05c02e5e29be542a68a579824 (diff)
[1.8.x] Fixed #26309 -- Documented that login URL settings no longer support dotted paths.
Backport of 2404d209a5e8c4573927e14587735562b79e13ed from master
-rw-r--r--docs/internals/deprecation.txt3
-rw-r--r--docs/ref/settings.txt27
-rw-r--r--docs/releases/1.8.txt3
3 files changed, 20 insertions, 13 deletions
diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt
index 2fca895ea0..ed82ad2ba9 100644
--- a/docs/internals/deprecation.txt
+++ b/docs/internals/deprecation.txt
@@ -34,6 +34,9 @@ details on these changes.
* The ability to :func:`~django.core.urlresolvers.reverse` URLs using a dotted
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
(replaced by :py:mod:`argparse`).
diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt
index 426cae5404..30a2c7d1fe 100644
--- a/docs/ref/settings.txt
+++ b/docs/ref/settings.txt
@@ -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`
decorator, for example.
-This setting also accepts view function names and :ref:`named URL patterns
-<naming-url-patterns>` which can be used to reduce configuration duplication
-since you don't have to define the URL in two places (``settings`` and URLconf).
+This setting also accepts :ref:`named URL patterns <naming-url-patterns>` which
+can be used to reduce configuration duplication since you don't have to define
+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
@@ -2880,18 +2885,14 @@ Default: ``'/accounts/login/'``
The URL where requests are redirected for login, especially when using the
:func:`~django.contrib.auth.decorators.login_required` decorator.
-This setting also accepts view function names and :ref:`named URL patterns
-<naming-url-patterns>` which can be used to reduce configuration duplication
-since you don't have to define the URL in two places (``settings`` and URLconf).
-
-.. setting:: LOGOUT_URL
+This setting also accepts :ref:`named URL patterns <naming-url-patterns>` which
+can be used to reduce configuration duplication since you don't have to define
+the URL in two places (``settings`` and URLconf).
-LOGOUT_URL
-----------
-
-Default: ``'/accounts/logout/'``
+.. deprecated:: 1.8
-LOGIN_URL counterpart.
+ The setting may also be a dotted Python path to a view function. Support
+ for this will be removed in Django 1.10.
.. setting:: PASSWORD_RESET_TIMEOUT_DAYS
diff --git a/docs/releases/1.8.txt b/docs/releases/1.8.txt
index b93e989f80..803300e9d7 100644
--- a/docs/releases/1.8.txt
+++ b/docs/releases/1.8.txt
@@ -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'``
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
Aggregate methods and modules