Opened 16 years ago

Closed 16 years ago

Last modified 13 years ago

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

10266.diff (541 bytes ) - added by Matt Boersma 16 years ago.
Clarify that the user must start a new Python shell to see changes to models

Download all attachments as: .zip

Change History (9)

comment:1 by Karen Tracey, 16 years ago

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

comment:2 by Jacob, 16 years ago

milestone: 1.1
Triage Stage: UnreviewedAccepted

by Matt Boersma, 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 Matt Boersma, 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 Tim Graham, 16 years ago

Triage Stage: AcceptedReady for checkin

comment:5 by Kevin Kubasik, 16 years ago

Keywords: kkmegapatch added
Owner: changed from nobody to Kevin Kubasik

comment:6 by Gary Wilson, 16 years ago

Resolution: fixed
Status: newclosed

(In [10263]) Fixed #10266 -- Clarified restart of shell in tutorial, patch from mboersma.

comment:7 by Gary Wilson, 16 years ago

(In [10264]) [1.0.X]: Fixed #10266 -- Clarified restart of shell in tutorial, patch from mboersma.

Backport of r10263 from trunk.

comment:8 by Jacob, 13 years ago

milestone: 1.1

Milestone 1.1 deleted

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