diff options
| author | lukasz.wojcik <lukasz.wojcik@propylon.com> | 2015-06-05 16:42:05 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-07-21 08:26:41 -0400 |
| commit | 927b30a6ab33ea33e5e3b1e7408ac1d5d267ff6a (patch) | |
| tree | 045cda0320e98aec4e20d8e83c76e30e0ec342d3 /docs | |
| parent | 5fd83db255500507484c5fedbd98763460a59656 (diff) | |
Fixed #24126 -- Deprecated current_app parameter to auth views.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/internals/deprecation.txt | 2 | ||||
| -rw-r--r-- | docs/releases/1.9.txt | 18 | ||||
| -rw-r--r-- | docs/topics/auth/default.txt | 45 |
3 files changed, 65 insertions, 0 deletions
diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt index 9aaa5676a4..ae57f5e8f4 100644 --- a/docs/internals/deprecation.txt +++ b/docs/internals/deprecation.txt @@ -84,6 +84,8 @@ details on these changes. * ``django.template.loaders.eggs.Loader`` will be removed. +* The ``current_app`` parameter to the ``contrib.auth`` views will be removed. + .. _deprecation-removed-in-1.10: 1.10 diff --git a/docs/releases/1.9.txt b/docs/releases/1.9.txt index 162430e502..693ba7c521 100644 --- a/docs/releases/1.9.txt +++ b/docs/releases/1.9.txt @@ -981,6 +981,24 @@ impossible to reverse the patterns if there was an application namespace with the same name. Includes that specify an instance namespace require that the included URLconf sets an application namespace. +``current_app`` parameter to ``contrib.auth`` views +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +All views in ``django.contrib.auth.views`` have the following structure:: + + def view(request, ..., current_app=None, ...): + + ... + + if current_app is not None: + request.current_app = current_app + + return TemplateResponse(request, template_name, context) + +As of Django 1.8, ``current_app`` is set on the ``request`` object. For +consistency, these views will require the caller to set ``current_app`` on the +``request`` instead of passing it in a separate argument. + Miscellaneous ~~~~~~~~~~~~~ diff --git a/docs/topics/auth/default.txt b/docs/topics/auth/default.txt index 0ff6307cfb..88703c6023 100644 --- a/docs/topics/auth/default.txt +++ b/docs/topics/auth/default.txt @@ -933,6 +933,11 @@ implementation details see :ref:`using-the-views`. * ``extra_context``: A dictionary of context data that will be added to the default context data passed to the template. + .. deprecated:: 1.9 + + The ``current_app`` parameter is deprecated and will be removed in + Django 2.0. Callers should set ``request.current_app`` instead. + Here's what ``django.contrib.auth.views.login`` does: * If called via ``GET``, it displays a login form that POSTs to the @@ -1059,6 +1064,11 @@ implementation details see :ref:`using-the-views`. * ``extra_context``: A dictionary of context data that will be added to the default context data passed to the template. + .. deprecated:: 1.9 + + The ``current_app`` parameter is deprecated and will be removed in + Django 2.0. Callers should set ``request.current_app`` instead. + **Template context:** * ``title``: The string "Logged out", localized. @@ -1100,6 +1110,11 @@ implementation details see :ref:`using-the-views`. * ``extra_context``: A dictionary of context data that will be added to the default context data passed to the template. + .. deprecated:: 1.9 + + The ``current_app`` parameter is deprecated and will be removed in + Django 2.0. Callers should set ``request.current_app`` instead. + .. function:: password_change(request[, template_name, post_change_redirect, password_change_form, current_app, extra_context]) Allows a user to change their password. @@ -1127,6 +1142,11 @@ implementation details see :ref:`using-the-views`. * ``extra_context``: A dictionary of context data that will be added to the default context data passed to the template. + .. deprecated:: 1.9 + + The ``current_app`` parameter is deprecated and will be removed in + Django 2.0. Callers should set ``request.current_app`` instead. + **Template context:** * ``form``: The password change form (see ``password_change_form`` above). @@ -1150,6 +1170,11 @@ implementation details see :ref:`using-the-views`. * ``extra_context``: A dictionary of context data that will be added to the default context data passed to the template. + .. deprecated:: 1.9 + + The ``current_app`` parameter is deprecated and will be removed in + Django 2.0. Callers should set ``request.current_app`` instead. + .. function:: password_reset(request[, is_admin_site, template_name, email_template_name, password_reset_form, token_generator, post_reset_redirect, from_email, current_app, extra_context, html_email_template_name]) Allows a user to reset their password by generating a one-time use link @@ -1216,6 +1241,11 @@ implementation details see :ref:`using-the-views`. The ``is_admin_site`` argument is deprecated and will be removed in Django 1.10. + .. deprecated:: 1.9 + + The ``current_app`` parameter is deprecated and will be removed in + Django 2.0. Callers should set ``request.current_app`` instead. + **Template context:** * ``form``: The form (see ``password_reset_form`` above) for resetting @@ -1281,6 +1311,11 @@ implementation details see :ref:`using-the-views`. * ``extra_context``: A dictionary of context data that will be added to the default context data passed to the template. + .. deprecated:: 1.9 + + The ``current_app`` parameter is deprecated and will be removed in + Django 2.0. Callers should set ``request.current_app`` instead. + .. function:: password_reset_confirm(request[, uidb64, token, template_name, token_generator, set_password_form, post_reset_redirect, current_app, extra_context]) Presents a form for entering a new password. @@ -1322,6 +1357,11 @@ implementation details see :ref:`using-the-views`. * ``validlink``: Boolean, True if the link (combination of ``uidb64`` and ``token``) is valid or unused yet. + .. deprecated:: 1.9 + + The ``current_app`` parameter is deprecated and will be removed in + Django 2.0. Callers should set ``request.current_app`` instead. + .. function:: password_reset_complete(request[,template_name, current_app, extra_context]) Presents a view which informs the user that the password has been @@ -1341,6 +1381,11 @@ implementation details see :ref:`using-the-views`. * ``extra_context``: A dictionary of context data that will be added to the default context data passed to the template. + .. deprecated:: 1.9 + + The ``current_app`` parameter is deprecated and will be removed in + Django 2.0. Callers should set ``request.current_app`` instead. + Helper functions ---------------- |
