Ticket #27292: 27292.diff

File 27292.diff, 1.4 KB (added by Tim Graham, 8 years ago)
  • docs/topics/auth/customizing.txt

    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::  
    139139        """
    140140        Authenticate against the settings ADMIN_LOGIN and ADMIN_PASSWORD.
    141141
    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:
    143143
    144144        ADMIN_LOGIN = 'admin'
    145145        ADMIN_PASSWORD = 'pbkdf2_sha256$30000$Vo0VlMnkR4Bk$qEvtdyZRWTcOsCnI/oQ7fVOu1XAURIZYoOZ3iq8Dr4M='
    object the first time a user authenticates::  
    152152                try:
    153153                    user = User.objects.get(username=username)
    154154                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)
    159158                    user.is_staff = True
    160159                    user.is_superuser = True
    161160                    user.save()
Back to Top