Opened 11 years ago

Closed 11 years ago

#22694 closed Bug (worksforme)

Code error in Django 1.6 tutorial, part 3

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

Description

In the definition for the vote method, the line:

return HttpResponseRedirect(reverse('polls:results', args=(p.id,)))

should be:

return HttpResponseRedirect(reverse('polls:results', args=[p.id])) (brackets, not parens)

I'm labeling this release blocker as the the code will not run without the change.

Change History (1)

comment:1 by Baptiste Mispelon, 11 years ago

Resolution: worksforme
Status: newclosed

Hi,

The code looks OK to me.
I suspect you might have typed args=(p.id) instead of args=(p.id,).

Thanks.

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