Code

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

Attachments (0)

Change History (2)

comment:1 Changed 16 months ago by Numtek

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

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 Changed 16 months ago by claudep

  • Resolution set to duplicate
  • Status changed from new to closed

Already reported in #19555

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.