Code

Opened 5 years ago

Closed 5 years ago

#11628 closed (fixed)

Incorrect comment in part 1 of tutorial

Reported by: tommstein@… Owned by: nobody
Component: Documentation Version: master
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

In the last big box full of example code in part 1 of the tutorial, it says

# Get the poll whose year is 2007. Of course, if you're going through this
# tutorial in another year, change as appropriate.
>>> Poll.objects.get(pub_date__year=2007)
<Poll: What's up?>

I first tried this with the parameter set to 2009 as instructed by the comment, and got a DoesNotExist exception. Then it occurred to me that a little earlier in the page we had set the year to 2007, so the comment saying to change the year does nothing but mess you up.

This is actually against version 1.1, but that's still not an option in the Version dropdown. Maybe that should be its own ticket.

Attachments (1)

11628.diff (548 bytes) - added by timo 5 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 5 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

Changed 5 years ago by timo

comment:2 Changed 5 years ago by timo

  • Has patch set
  • Triage Stage changed from Accepted to Ready for checkin

comment:3 Changed 5 years ago by russellm

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

(In [11538]) Fixed #11628 -- Corrected the tutorial, removing instructions to update the year where that isn't required. Thanks to tommstein for the report.

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.