#10914: The chapter "Write a simple form" produces code with bad Choice.DoesNotExist handling ---------------------------+------------------------------------------------ Reporter: tobami | Owner: nobody Status: new | Milestone: Component: Documentation | Version: 1.0 Keywords: | Stage: Unreviewed Has_patch: 0 | ---------------------------+------------------------------------------------ If you code the “polls/detail.html” template and the "mysite/polls/views.py" vote() function as in the tutorial, after voting without choosing an option, a DoesNotExist exception is raised and the poll voting form is redisplayed with a "You didn't select a choice." message. The problem is that you cannot try to vote a second time, because the redisplayed page is not "polls/1/" but "polls/1/vote/".
To reproduce:[[BR]] - Complete tutorial 1 to 4 (for Django 1.0.2)[[BR]] - go to "http://localhost:8000/polls/1/" [[BR]] - Click vote without selecting a Choice[[BR]] - The page will be polls/1/vote/, not polls/1/ again[[BR]] - Try to vote (or not, just click again vote)[[BR]] [[BR]] It fails because it tries to access "polls/1/vote/vote/"[[BR]] -- Ticket URL: <http://code.djangoproject.com/ticket/10914> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" 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-updates?hl=en -~----------~----~----~----~------~----~------~--~---
