diff options
| author | Daniel Quinn <code@danielquinn.org> | 2016-02-22 13:11:50 +0000 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-02-22 12:43:36 -0500 |
| commit | 174811c5538c8c0b8f66089b31686e80d2bc7d3b (patch) | |
| tree | 7b9737e838b2aa8b4913ece5741e52587ec461f6 /docs | |
| parent | c7448c39a313abb33afd23207348d6f3afae9ce8 (diff) | |
[1.9.x] Fixed import location of check_password() in docs.
Backport of de7edc005f06c47c1d39d5cb30762d424ee4dabf from master
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/auth/customizing.txt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/docs/topics/auth/customizing.txt b/docs/topics/auth/customizing.txt index 48eb4bb019..ce6c7502b8 100644 --- a/docs/topics/auth/customizing.txt +++ b/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): |
