diff options
| author | Tim Graham <timograham@gmail.com> | 2015-01-26 15:39:52 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-02-01 21:02:40 -0500 |
| commit | c79faae761659d51d58782dbd2b8058fb4668cfa (patch) | |
| tree | a83649a302c53dd2d0ce9e0f50c4017b8b5da979 /docs/topics/auth | |
| parent | 0e6091249295b0e06aff2b1b4411819f94a1c529 (diff) | |
Removed versionadded/changed notes for 1.7.
Diffstat (limited to 'docs/topics/auth')
| -rw-r--r-- | docs/topics/auth/customizing.txt | 18 | ||||
| -rw-r--r-- | docs/topics/auth/default.txt | 19 |
2 files changed, 10 insertions, 27 deletions
diff --git a/docs/topics/auth/customizing.txt b/docs/topics/auth/customizing.txt index 1a5e33f3ba..d75b4b6cb8 100644 --- a/docs/topics/auth/customizing.txt +++ b/docs/topics/auth/customizing.txt @@ -436,18 +436,16 @@ different User model. class Article(models.Model): author = models.ForeignKey(settings.AUTH_USER_MODEL) - .. versionadded:: 1.7 + When connecting to signals sent by the ``User`` model, you should specify + the custom model using the :setting:`AUTH_USER_MODEL` setting. For example:: - When connecting to signals sent by the User model, you should specify the - custom model using the :setting:`AUTH_USER_MODEL` setting. For example:: - - from django.conf import settings - from django.db.models.signals import post_save + from django.conf import settings + from django.db.models.signals import post_save - def post_save_receiver(signal, sender, instance, **kwargs): - pass + def post_save_receiver(signal, sender, instance, **kwargs): + pass - post_save.connect(post_save_receiver, sender=settings.AUTH_USER_MODEL) + post_save.connect(post_save_receiver, sender=settings.AUTH_USER_MODEL) Generally speaking, you should reference the User model with the :setting:`AUTH_USER_MODEL` setting in code that is executed at import @@ -637,8 +635,6 @@ The following methods are available on any subclass of .. method:: models.AbstractBaseUser.get_session_auth_hash() - .. versionadded:: 1.7 - Returns an HMAC of the password field. Used for :ref:`session-invalidation-on-password-change`. diff --git a/docs/topics/auth/default.txt b/docs/topics/auth/default.txt index aed6187a37..f7bc764d47 100644 --- a/docs/topics/auth/default.txt +++ b/docs/topics/auth/default.txt @@ -108,8 +108,6 @@ Django also provides :ref:`views <built-in-auth-views>` and :ref:`forms <built-in-auth-forms>` that may be used to allow users to change their own passwords. -.. versionadded:: 1.7 - Changing a user's password will log out all their sessions if the :class:`~django.contrib.auth.middleware.SessionAuthenticationMiddleware` is enabled. See :ref:`session-invalidation-on-password-change` for details. @@ -560,11 +558,13 @@ The permission_required decorator def my_view(request): ... - As for the :meth:`~django.contrib.auth.models.User.has_perm` method, + Just like the :meth:`~django.contrib.auth.models.User.has_perm` method, permission names take the form ``"<app label>.<permission codename>"`` (i.e. ``polls.can_vote`` for a permission on a model in the ``polls`` application). + The decorator may also take a list of permissions. + Note that :func:`~django.contrib.auth.decorators.permission_required()` also takes an optional ``login_url`` parameter. Example:: @@ -582,11 +582,6 @@ The permission_required decorator (HTTP Forbidden) view<http_forbidden_view>` instead of redirecting to the login page. - .. versionchanged:: 1.7 - - The :func:`~django.contrib.auth.decorators.permission_required` - decorator can take a list of permissions as well as a single permission. - .. _applying-permissions-to-generic-views: Applying permissions to generic views @@ -603,8 +598,6 @@ To apply a permission to a :doc:`class-based generic view Session invalidation on password change ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. versionadded:: 1.7 - .. warning:: This protection only applies if @@ -986,10 +979,6 @@ patterns. for generating a ``text/html`` multipart email with the password reset link. By default, HTML email is not sent. - .. versionadded:: 1.7 - - ``html_email_template_name`` was added. - .. deprecated:: 1.8 The ``is_admin_site`` argument is deprecated and will be removed in @@ -1177,8 +1166,6 @@ provides several built-in forms located in :mod:`django.contrib.auth.forms`: .. method:: confirm_login_allowed(user) - .. versionadded:: 1.7 - By default, ``AuthenticationForm`` rejects users whose ``is_active`` flag is set to ``False``. You may override this behavior with a custom policy to determine which users can log in. Do this with a custom form that subclasses |
