Opened 19 years ago
Closed 19 years ago
#1912 closed defect (duplicate)
documentation/tutorial1 corrections
Reported by: | Owned by: | Jacob | |
---|---|---|---|
Component: | Documentation | Version: | |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
First off, I love the way you guys write documentation.
Some issues with http://www.djangoproject.com/documentation/tutorial1/
- At this point you should probably change 2005 to 2006
- once you define Poll.was_published_today() you need to import datetime into your model.
- the way your example writes Poll.was_published_today() gives me an attribute error (OSX 10.4.6, python 2.4.3),
I believe you want to use is;
def was_published_today(self): return self.pub_date.day == datetime.now().day
- All the shell interaction responses are off (they look like they are in namespaces now), probably because they were changed recently, what I get is
<Choice: Not much> <Choice: the sky> <Poll: What's up?>
Note:
See TracTickets
for help on using tickets.
Thanks for the comments. A little feedback..
from datetime import datetime
. We doimport datetime
and date is a method of the datetime module (and now() is not).So I think we can close this one off. But thanks for the feedback, in any case.