#9771: Wrong form action ----------------------------------------------------+----------------------- Reporter: tutonien | Owner: nobody Status: new | Milestone: Component: Documentation | Version: 1.0 Keywords: tutorial, form, post, action, absolute | Stage: Unreviewed Has_patch: 0 | ----------------------------------------------------+----------------------- Hello,
There may be an improvement in the form of the [http://docs.djangoproject.com/en/dev/intro/tutorial04/#write-a-simple- form fourth part of the tutorial]. The form sends the vote to /polls/123/vote/ (with 123 the poll id) but the form itself is in the detail page which URL is /polls/123/. Therefore, it would make more sense to use a relative URL instead of an absolute one. {{{ <form action="/polls/{{ poll.id }}/vote/" method="post"> }}} This way, the poll app would be more "pluggable" because the polls directory does not need to be at the root of the server. {{{ <form action="vote/" method="post"> }}} Thank you for your time and your good work. -- Ticket URL: <http://code.djangoproject.com/ticket/9771> 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 -~----------~----~----~----~------~----~------~--~---
