Opened 11 years ago

Closed 11 years ago

#20790 closed Uncategorized (invalid)

Wrong linking in tutorial part 4

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

Description

This is in Django tutorial part 4 (https://docs.djangoproject.com/en/1.5/intro/tutorial04/)
When we create a polls/results.html template, "Vote again?" link doesn't lead to voting.

We should replace
<a href="{% url 'polls:detail ' poll.id %}">Vote again?</a>
with
<a href="{% url 'polls:vote ' poll.id %}">Vote again?</a>

That way it will ask us to vote again.

Change History (1)

comment:1 by Baptiste Mispelon, 11 years ago

Resolution: invalid
Status: newclosed

Hi,

The polls:detail view's template also includes a form that allows you to vote (that's done in the first step of part 4 [1]).

Additionally, the way that polls:vote is written, accessing it directly would display the form with an error message ("You didn't select a choice.").

[1] https://docs.djangoproject.com/en/dev/intro/tutorial04/#write-a-simple-form

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