summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-10-04 14:02:06 -0400
committerTim Graham <timograham@gmail.com>2016-10-04 14:02:06 -0400
commite262f002311735869a5d8b0a8f788708322db595 (patch)
tree721d0be10bebd308260409c39344901be047099b /docs
parent8ac115c730353dfc6bdbd03e0671a978dcc99e15 (diff)
Fixed #27292 -- Removed unnecessary password assignment in auth backend example.
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/auth/customizing.txt9
1 files changed, 4 insertions, 5 deletions
diff --git a/docs/topics/auth/customizing.txt b/docs/topics/auth/customizing.txt
index f3b53f17f5..09b564039b 100644
--- a/docs/topics/auth/customizing.txt
+++ b/docs/topics/auth/customizing.txt
@@ -139,7 +139,7 @@ object the first time a user authenticates::
"""
Authenticate against the settings ADMIN_LOGIN and ADMIN_PASSWORD.
- Use the login name, and a hash of the password. For example:
+ Use the login name and a hash of the password. For example:
ADMIN_LOGIN = 'admin'
ADMIN_PASSWORD = 'pbkdf2_sha256$30000$Vo0VlMnkR4Bk$qEvtdyZRWTcOsCnI/oQ7fVOu1XAURIZYoOZ3iq8Dr4M='
@@ -152,10 +152,9 @@ object the first time a user authenticates::
try:
user = User.objects.get(username=username)
except User.DoesNotExist:
- # Create a new user. Note that we can set password
- # to anything, because it won't be checked; the password
- # from settings.py will.
- user = User(username=username, password='get from settings.py')
+ # Create a new user. There's no need to set a password
+ # because only the password from settings.py is checked.
+ user = User(username=username)
user.is_staff = True
user.is_superuser = True
user.save()