Opened 12 years ago

Closed 12 years ago

#19568 closed Bug (duplicate)

2012 is so last year!

Reported by: damian@… Owned by: nobody
Component: Documentation Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: yes

Description

I was reading through the excellent tutorial for 1.4 (and let me just say it really is excellent - one of the best I've ever done), and as it's now 2013, some of the exercises on the first page - https://docs.djangoproject.com/en/1.4/intro/tutorial01/ don't work so well. In particular:

# Get the poll whose year is 2012.
>>> Poll.objects.get(pub_date__year=2012)
<Poll: What's up?>

will return nothing (because there's no polls in 2012 as the poll was created 'now' (ie. 2013)

Similarly:

# Find all Choices for any poll whose pub_date is in 2012.
>>> Choice.objects.filter(poll__pub_date__year=2012)
[<Choice: Not much>, <Choice: The sky>, <Choice: Just hacking again>]

So I guess I'm saying just switching 2013 for 2012 in that page.

Otherwise, really excellent work on the tutorial!

Change History (1)

comment:1 by Tim Graham, 12 years ago

Resolution: duplicate
Status: newclosed

Thanks, but this has already been reported in #19555.

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