Opened 12 years ago
Closed 12 years ago
#19564 closed Bug (duplicate)
Little fix in the tutorial part 1
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Documentation | Version: | 1.5-beta-1 |
Severity: | Normal | Keywords: | Tutorial |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
In the Tutorial Part 1 of the documentation, in version 1.5 and dev there is a small catch in the end, when it's written:
# Get the poll whose year is 2012.
Poll.objects.get(pub_dateyear=2012)
<Poll: What's up?>
and down:
# Find all Choices for any poll whose pub_date is in 2012.
Choice.objects.filter(pollpub_dateyear=2012)
[<Choice: Not much>, <Choice: The sky>, <Choice: Just hacking again>]
It is returning no poll because we are in 2013.. you should replace all 2012 occurrences with 2013 to no cause confusion to the newcamers ;)
If you change this into 2013 you'll be running into the same problem in 2014. May I suggest looking up the date instead of hardcoding this?