mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Removed versionadded/changed annotations dating back to 1.4.
This commit is contained in:
parent
ef017a5f00
commit
7ee7599ab3
49 changed files with 59 additions and 409 deletions
|
@ -522,12 +522,10 @@ The permission_required decorator
|
|||
As in the :func:`~django.contrib.auth.decorators.login_required` decorator,
|
||||
``login_url`` defaults to :setting:`settings.LOGIN_URL <LOGIN_URL>`.
|
||||
|
||||
.. versionchanged:: 1.4
|
||||
|
||||
Added ``raise_exception`` parameter. If given, the decorator will raise
|
||||
:exc:`~django.core.exceptions.PermissionDenied`, prompting
|
||||
:ref:`the 403 (HTTP Forbidden) view<http_forbidden_view>` instead of
|
||||
redirecting to the login page.
|
||||
If the ``raise_exception`` parameter is given, the decorator will raise
|
||||
:exc:`~django.core.exceptions.PermissionDenied`, prompting :ref:`the 403
|
||||
(HTTP Forbidden) view<http_forbidden_view>` instead of redirecting to the
|
||||
login page.
|
||||
|
||||
Applying permissions to generic views
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -552,8 +550,6 @@ password management. These make use of the :ref:`stock auth forms
|
|||
Django provides no default template for the authentication views - however the
|
||||
template context is documented for each view below.
|
||||
|
||||
.. versionadded:: 1.4
|
||||
|
||||
The built-in views all return
|
||||
a :class:`~django.template.response.TemplateResponse` instance, which allows
|
||||
you to easily customize the response data before rendering. For more details,
|
||||
|
@ -747,11 +743,10 @@ patterns.
|
|||
that can be used to reset the password, and sending that link to the
|
||||
user's registered email address.
|
||||
|
||||
.. versionchanged:: 1.4
|
||||
Users flagged with an unusable password (see
|
||||
:meth:`~django.contrib.auth.models.User.set_unusable_password()`
|
||||
will not be able to request a password reset to prevent misuse
|
||||
when using an external authentication source like LDAP.
|
||||
Users flagged with an unusable password (see
|
||||
:meth:`~django.contrib.auth.models.User.set_unusable_password()` aren't
|
||||
allowed to request a password reset to prevent misuse when using an
|
||||
external authentication source like LDAP.
|
||||
|
||||
**URL name:** ``password_reset``
|
||||
|
||||
|
@ -769,8 +764,6 @@ patterns.
|
|||
the subject of the email with the reset password link. Defaults
|
||||
to :file:`registration/password_reset_subject.txt` if not supplied.
|
||||
|
||||
.. versionadded:: 1.4
|
||||
|
||||
* ``password_reset_form``: Form that will be used to get the email of
|
||||
the user to reset the password for. Defaults to
|
||||
:class:`~django.contrib.auth.forms.PasswordResetForm`.
|
||||
|
|
|
@ -13,10 +13,8 @@ work with hashed passwords.
|
|||
How Django stores passwords
|
||||
===========================
|
||||
|
||||
.. versionadded:: 1.4
|
||||
Django 1.4 introduces a new flexible password storage system and uses
|
||||
PBKDF2 by default. Previous versions of Django used SHA1, and other
|
||||
algorithms couldn't be chosen.
|
||||
Django provides a flexible password storage system and uses PBKDF2 by default.
|
||||
Older versions of Django used SHA1, and other algorithms couldn't be chosen.
|
||||
|
||||
The :attr:`~django.contrib.auth.models.User.password` attribute of a
|
||||
:class:`~django.contrib.auth.models.User` object is a string in this format::
|
||||
|
@ -173,15 +171,12 @@ Manually managing a user's password
|
|||
|
||||
.. module:: django.contrib.auth.hashers
|
||||
|
||||
.. versionadded:: 1.4
|
||||
The :mod:`django.contrib.auth.hashers` module provides a set of functions
|
||||
to create and validate hashed password. You can use them independently
|
||||
from the ``User`` model.
|
||||
|
||||
.. function:: check_password(password, encoded)
|
||||
|
||||
.. versionadded:: 1.4
|
||||
|
||||
If you'd like to manually authenticate a user by comparing a plain-text
|
||||
password to the hashed password in the database, use the convenience
|
||||
function :func:`django.contrib.auth.hashers.check_password`. It takes two
|
||||
|
@ -191,8 +186,6 @@ Manually managing a user's password
|
|||
|
||||
.. function:: make_password(password[, salt, hashers])
|
||||
|
||||
.. versionadded:: 1.4
|
||||
|
||||
Creates a hashed password in the format used by this application. It takes
|
||||
one mandatory argument: the password in plain-text. Optionally, you can
|
||||
provide a salt and a hashing algorithm to use, if you don't want to use the
|
||||
|
@ -206,7 +199,5 @@ Manually managing a user's password
|
|||
|
||||
.. function:: is_password_usable(encoded_password)
|
||||
|
||||
.. versionadded:: 1.4
|
||||
|
||||
Checks if the given string is a hashed password that has a chance
|
||||
of being verified against :func:`django.contrib.auth.hashers.check_password`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue