On 26 May 00:28, Allan wrote:
>
> I'm completely around the axle on this.
> ---------------------------------------------------------------------
> ** The log:
> [26/May/2009 00:06:43] "GET /polls/1/detail/ HTTP/1.1" 200 333
> [26/May/2009 00:06:49] "POST /polls/1/detail/vote/ HTTP/1.1" 404 2314
^^^ That should really be a post to /polls/1/vote/ not to /polls/1/detail/vote/
> ** The 404:
> Using the URLconf defined in mysite.urls, Django tried these URL
> patterns, in this order:
>
> 1. ^admin/
> 2. ^admin/doc/
> 3. ^polls/ ^admin/doc/
> 4. ^polls/ ^$
> 5. ^polls/ ^(?P<poll_id>\d+)/detail/$
> 6. ^polls/ ^(?P<poll_id>\d+)/results/$
> 7. ^polls/ ^(?P<poll_id>\d+)/vote/$
>
> The current URL, polls/1/detail/vote/, didn't match any of these.
>
> ** The template (detail.html)
>
> <h1>{{ poll.question }}</h1>
>
> {% if error_message %}<p><strong>{{ error_message }}</strong></p>{%
> endif %}
>
> <form action="vote/" method="post">
^^^ the action there should probably be /polls/{{ poll.id }}/vote/
(but that's not very pretty).
Cheers,
--
Brett Parker
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---