瀏覽代碼

Fixed import location of check_password() in docs.

Daniel Quinn 9 年之前
父節點
當前提交
de7edc005f
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      docs/topics/auth/customizing.txt

+ 3 - 2
docs/topics/auth/customizing.txt

@@ -127,7 +127,8 @@ variable defined in your ``settings.py`` file and creates a Django ``User``
 object the first time a user authenticates::
 
     from django.conf import settings
-    from django.contrib.auth.models import User, check_password
+    from django.contrib.auth.hashers import check_password
+    from django.contrib.auth.models import User
 
     class SettingsBackend(object):
         """
@@ -136,7 +137,7 @@ object the first time a user authenticates::
         Use the login name, and a hash of the password. For example:
 
         ADMIN_LOGIN = 'admin'
-        ADMIN_PASSWORD = 'sha1$4e987$afbcf42e21bd417fb71db8c66b321e9fc33051de'
+        ADMIN_PASSWORD = 'pbkdf2_sha256$30000$Vo0VlMnkR4Bk$qEvtdyZRWTcOsCnI/oQ7fVOu1XAURIZYoOZ3iq8Dr4M='
         """
 
         def authenticate(self, username=None, password=None):