Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed 17764. Improved auth docs.

Thanks mbt for the report and patch.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@17620 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit a255d3933828ea5ab5173bc41336a64f446057bb 1 parent 84dd83f
Paul McMillan authored March 02, 2012
2  docs/releases/1.4.txt
@@ -536,7 +536,7 @@ Django 1.4 also includes several smaller improvements worth noting:
536 536
   page.
537 537
 
538 538
 * The :func:`django.contrib.auth.models.check_password` function has been moved
539  
-  to the :mod:`django.contrib.auth.utils` module. Importing it from the old
  539
+  to the :mod:`django.contrib.auth.hashers` module. Importing it from the old
540 540
   location will still work, but you should update your imports.
541 541
 
542 542
 * The :djadmin:`collectstatic` management command now has a ``--clear`` option
12  docs/topics/auth.txt
@@ -760,18 +760,20 @@ Django provides two functions in :mod:`django.contrib.auth`:
760 760
 Manually managing a user's password
761 761
 -----------------------------------
762 762
 
763  
-.. currentmodule:: django.contrib.auth.utils
  763
+.. currentmodule:: django.contrib.auth.hashers
764 764
 
765 765
 .. versionadded:: 1.4
766  
-    The :mod:`django.contrib.auth.utils` module provides a set of functions
  766
+    The :mod:`django.contrib.auth.hashers` module provides a set of functions
767 767
     to create and validate hashed password. You can use them independently
768 768
     from the ``User`` model.
769 769
 
770 770
 .. function:: check_password()
771 771
 
  772
+    .. versionadded:: 1.4
  773
+
772 774
     If you'd like to manually authenticate a user by comparing a plain-text
773 775
     password to the hashed password in the database, use the convenience
774  
-    function :func:`django.contrib.auth.utils.check_password`. It takes two
  776
+    function :func:`django.contrib.auth.hashers.check_password`. It takes two
775 777
     arguments: the plain-text password to check, and the full value of a
776 778
     user's ``password`` field in the database to check against, and returns
777 779
     ``True`` if they match, ``False`` otherwise.
@@ -785,14 +787,14 @@ Manually managing a user's password
785 787
     Currently supported algorithms are: ``'sha1'``, ``'md5'`` and ``'crypt'``
786 788
     if you have the ``crypt`` library installed. If the second argument is
787 789
     ``None``, an unusable password is returned (a one that will be never
788  
-    accepted by :func:`django.contrib.auth.utils.check_password`).
  790
+    accepted by :func:`django.contrib.auth.hashers.check_password`).
789 791
 
790 792
 .. function:: is_password_usable()
791 793
 
792 794
    .. versionadded:: 1.4
793 795
 
794 796
    Checks if the given string is a hashed password that has a chance
795  
-   of being verified against :func:`django.contrib.auth.utils.check_password`.
  797
+   of being verified against :func:`django.contrib.auth.hashers.check_password`.
796 798
 
797 799
 
798 800
 How to log a user out

0 notes on commit a255d39

Please sign in to comment.
Something went wrong with that request. Please try again.