diff --git a/docs/topics/auth/customizing.txt b/docs/topics/auth/customizing.txt
index f3b53f1..09b5640 100644
|
a
|
b
|
object the first time a user authenticates::
|
| 139 | 139 | """ |
| 140 | 140 | Authenticate against the settings ADMIN_LOGIN and ADMIN_PASSWORD. |
| 141 | 141 | |
| 142 | | Use the login name, and a hash of the password. For example: |
| | 142 | Use the login name and a hash of the password. For example: |
| 143 | 143 | |
| 144 | 144 | ADMIN_LOGIN = 'admin' |
| 145 | 145 | ADMIN_PASSWORD = 'pbkdf2_sha256$30000$Vo0VlMnkR4Bk$qEvtdyZRWTcOsCnI/oQ7fVOu1XAURIZYoOZ3iq8Dr4M=' |
| … |
… |
object the first time a user authenticates::
|
| 152 | 152 | try: |
| 153 | 153 | user = User.objects.get(username=username) |
| 154 | 154 | except User.DoesNotExist: |
| 155 | | # Create a new user. Note that we can set password |
| 156 | | # to anything, because it won't be checked; the password |
| 157 | | # from settings.py will. |
| 158 | | user = User(username=username, password='get from settings.py') |
| | 155 | # Create a new user. There's no need to set a password |
| | 156 | # because only the password from settings.py is checked. |
| | 157 | user = User(username=username) |
| 159 | 158 | user.is_staff = True |
| 160 | 159 | user.is_superuser = True |
| 161 | 160 | user.save() |