Opened 9 years ago

Closed 8 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@…> 9 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 9 years ago by anonymous

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Summary changed from error in Authentication docs (At this point, user is a User object ready to be saved) to poor wording in Authentication docs (create_user)

comment:2 Changed 9 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 9 years ago by John Shaffer <jshaffer2112@…>

  • Triage Stage changed from Unreviewed to Accepted

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

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

  • Has patch set
  • Triage Stage changed from Accepted to Ready for checkin

comment:5 Changed 8 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(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