Opened 12 years ago

Closed 12 years ago

#19564 closed Bug (duplicate)

Little fix in the tutorial part 1

Reported by: thiagocavila@… 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 ;)

Change History (2)

comment:1 by Numtek, 12 years ago

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?

comment:2 by Claude Paroz, 12 years ago

Resolution: duplicate
Status: newclosed

Already reported in #19555

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