Opened 12 years ago

Closed 12 years ago

#19275 closed Bug (invalid)

small bug in tutorial code

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

Description

Hello!
I'm working through your tutorial (which is great, by the way), and I've found a small problem with the 'detail.html' template code in part 4 of the tutorial.

You have this on line 5 (i've removed the brackets):

form action="/polls/{{ poll.id }}/vote/" method="post"

This produces a 404 error which says "...polls/1/vote cannot be found."

The tutorial suggests that this action SHOULD take us to the results page, which it doesn't until I replace the word 'vote' with 'results' on the same line:

form action="/polls/{{ poll.id }}/results/" method="post"

This fixes the problem, but I just want to make sure I'm not screwing something up by doing this, so I humbly present my findings to you for review.

I have attached a screen shot.

thank you!

RYAN.

Change History (3)

comment:1 by anonymous, 12 years ago

The screen shot was too bit, so I didn't attach it.

comment:2 by anonymous, 12 years ago

OK! I went back through everything I'd done so far in the tutorial to make sure the error wasn't mine, and I found that it WAS, in fact, me that made the mistake.
I accidentally wrote this:

url(r'(?P<poll_id>\d+)/vote$','vote'),

instead of this:

url(r'(?P<poll_id>\d+)/vote/$','vote'),

in the URLconf file in the polls/ directory.

sorry to have wasted your time!

have a lovely day,

RYAN.

comment:3 by Tim Graham, 12 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top