From 2404d209a5e8c4573927e14587735562b79e13ed Mon Sep 17 00:00:00 2001 From: Alasdair Nicol Date: Wed, 2 Mar 2016 15:48:13 +0000 Subject: Fixed #26309 -- Documented that login URL settings no longer support dotted paths. --- docs/internals/deprecation.txt | 3 +++ docs/ref/settings.txt | 18 +++++++++--------- docs/releases/1.10.txt | 3 +++ docs/releases/1.8.txt | 3 +++ 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt index e4a74abdf4..810f7d1a2b 100644 --- a/docs/internals/deprecation.txt +++ b/docs/internals/deprecation.txt @@ -173,6 +173,9 @@ details on these changes. * The ability to 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 47024514ca..9d94f53cfd 100644 --- a/docs/ref/settings.txt +++ b/docs/ref/settings.txt @@ -2624,9 +2624,9 @@ 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 -` 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 ` which +can be used to reduce configuration duplication since you don't have to define +the URL in two places (``settings`` and URLconf). .. setting:: LOGIN_URL @@ -2638,9 +2638,9 @@ 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 -` 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 ` 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_REDIRECT_URL @@ -2658,9 +2658,9 @@ The URL where requests are redirected after a user logs out using the If ``None``, no redirect will be performed and the logout view will be rendered. -This setting also accepts view function names and :ref:`named 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 ` which +can be used to reduce configuration duplication since you don't have to define +the URL in two places (``settings`` and URLconf). .. setting:: PASSWORD_RESET_TIMEOUT_DAYS diff --git a/docs/releases/1.10.txt b/docs/releases/1.10.txt index d935ab8c8f..436160e336 100644 --- a/docs/releases/1.10.txt +++ b/docs/releases/1.10.txt @@ -819,6 +819,9 @@ removed in Django 1.10 (please see the :ref:`deprecation timeline * The ability to :func:`~django.urls.reverse` URLs using a dotted Python path is removed. +* The ability to use a dotted Python path for the ``LOGIN_URL`` and + ``LOGIN_REDIRECT_URL`` settings is removed. + * Support for ``optparse`` is dropped for custom management commands. * The class ``django.core.management.NoArgsCommand`` is removed. diff --git a/docs/releases/1.8.txt b/docs/releases/1.8.txt index 5be97de04f..0ae2cba410 100644 --- a/docs/releases/1.8.txt +++ b/docs/releases/1.8.txt @@ -1351,6 +1351,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 -- cgit v1.2.1