Opened 11 years ago

Closed 11 years ago

#4923 closed (fixed)

poor wording in Authentication docs (create_user)

Reported by: djangotrac.20.skel@… Owned by: Jacob
Component: Documentation Version: master
Severity: Keywords: authentication
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


In the Authentication documentation under creating users there is some erroneous text:

>>> from django.contrib.auth.models import User
>>> user = User.objects.create_user('john', '', 'johnpassword')

# At this point, user is a User object ready to be saved
# to the database. You can continue to change its attributes
# if you want to change other fields.
>>> user.is_staff = True

The fact is, at that point the User object has ALREADY BEEN SAVED. The text implies that this has not yet happened.

Attachments (1)

authentication.diff (757 bytes) - added by Simon G. <dev@…> 11 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 11 years ago by anonymous

Summary: error in Authentication docs (At this point, user is a User object ready to be saved)poor wording in Authentication docs (create_user)

comment:2 Changed 11 years ago by djangotrac.20.skel@…

I should mention that before this text it does say that create_user() automatically saves. However, the text in the example is misleading. Additionally, the url anchor takes you directly to the example, so you don't see the earlier explanation of the function.

comment:3 Changed 11 years ago by John Shaffer <jshaffer2112@…>

Triage Stage: UnreviewedAccepted

Changed 11 years ago by Simon G. <dev@…>

Attachment: authentication.diff added

comment:4 Changed 11 years ago by Simon G. <dev@…>

Has patch: set
Triage Stage: AcceptedReady for checkin

comment:5 Changed 11 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

(In [6037]) Fixed #4923 -- Fixed error in docs/authentication.txt. Thanks, djangotrac.20.skel@…

Note: See TracTickets for help on using tickets.
Back to Top