#10266 closed (fixed)
Tutorial 01 __unicode__ step needs reload
Reported by: | g4d | Owned by: | Kevin Kubasik |
---|---|---|---|
Component: | Documentation | Version: | 1.0 |
Severity: | Keywords: | Tutorial 01, Tutorial01, unicode, __unicode__, model, models kkmegapatch | |
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
Hi,
In going through Tutorial 01, there seems to be a small step missing after adding the unicode methods to polls.models.py.
After adding unicode methods to models.py and entering "Poll.objects.all()" in the shell, I got the same response as before adding unicode methods ( [<Poll: Poll object>] ). I figured that my new changes had to be reloaded. Not knowing any spiffy command for reloading, I closed and reopened the shell and imported my project again. When I then entered Poll.object.all() in the shell, I got the expected [<Poll: What's up?>].
In retrospect, I probably could have just re-entered the import. I'm brand new to Django and pretty new to Python as well, so I will not try to supply the proper solution.
Hope this helps!
Regards,
G4D
Attachments (1)
Change History (9)
comment:1 by , 16 years ago
comment:2 by , 16 years ago
milestone: | → 1.1 |
---|---|
Triage Stage: | Unreviewed → Accepted |
by , 16 years ago
Attachment: | 10266.diff added |
---|
Clarify that the user must start a new Python shell to see changes to models
comment:3 by , 16 years ago
Has patch: | set |
---|
Rather than explain any mechanics of Python's class loader to tutorial readers, I simply removed the "jump back into the shell" wording and replaced it with "start a new shell," which shouldn't be error-prone if people are following along.
comment:4 by , 16 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
comment:5 by , 16 years ago
Keywords: | kkmegapatch added |
---|---|
Owner: | changed from | to
comment:6 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
#10269 is similar and was closed as a dupe. Note if you read far enough, the text mentions "jumping back into" the shell, implying a restart. But it seems that people are trying to test this change out immediately, so perhaps earlier mention (if it doesn't already exist, I haven't checked) of the need to restart the shell in order for any change such as this to take effect would be good. I thought it was already there somewhere but I may be remembering that from a beginning Python tutorial, not Django tutorial.