#27292: Improve example code in the "Writing an authentication backend" of the
documentation
--------------------------------------+--------------------
     Reporter:  Attila-Mihaly Balazs  |      Owner:  nobody
         Type:  Cleanup/optimization  |     Status:  new
    Component:  Documentation         |    Version:  1.10
     Severity:  Normal                |   Keywords:
 Triage Stage:  Unreviewed            |  Has patch:  0
Easy pickings:  0                     |      UI/UX:  0
--------------------------------------+--------------------
 Link: https://docs.djangoproject.com/en/1.10/topics/auth/customizing
 /#writing-an-authentication-backend

 It currently says:

 ...
                 # 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')
 ....

 A better practice would be to call "set_unusable_password()" on the user
 object.

--
Ticket URL: <https://code.djangoproject.com/ticket/27292>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/048.afdbfa536d31664f8ef8946a2b22da90%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to