Opened 18 years ago
Closed 18 years ago
#4923 closed (fixed)
poor wording in Authentication docs (create_user)
| Reported by: | Owned by: | Jacob | |
|---|---|---|---|
| Component: | Documentation | Version: | dev |
| Severity: | Keywords: | authentication | |
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
In the Authentication documentation under creating users there is some erroneous text:
http://www.djangoproject.com/documentation/authentication/#id1
>>> from django.contrib.auth.models import User
>>> user = User.objects.create_user('john', 'lennon@thebeatles.com', '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
>>> user.save()
The fact is, at that point the User object has ALREADY BEEN SAVED. The text implies that this has not yet happened.
Attachments (1)
Change History (6)
comment:1 by , 18 years ago
| 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 by , 18 years ago
comment:3 by , 18 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
by , 18 years ago
| Attachment: | authentication.diff added |
|---|
comment:4 by , 18 years ago
| Has patch: | set |
|---|---|
| Triage Stage: | Accepted → Ready for checkin |
comment:5 by , 18 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
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.