From a7f109d50f346b3f089d84c5747734724b7bb5a5 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Wed, 10 Jun 2009 12:57:06 +0000 Subject: [PATCH] [1.0.X] Fixed #10801 -- Reverted a portion of [10371]. Practicality beats purity in this case. Thanks to bruce@z2a.org for the report. Refs #9771. Merge of r10973 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10976 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/intro/tutorial04.txt | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/intro/tutorial04.txt b/docs/intro/tutorial04.txt index 07aa477d67..28ace85ca8 100644 --- a/docs/intro/tutorial04.txt +++ b/docs/intro/tutorial04.txt @@ -20,7 +20,7 @@ tutorial, so that the template contains an HTML ``
`` element: {% if error_message %}

{{ error_message }}

{% endif %} - + {% for choice in poll.choice_set.all %}
@@ -36,12 +36,12 @@ A quick rundown: selects one of the radio buttons and submits the form, it'll send the POST data ``choice=3``. This is HTML Forms 101. - * We set the form's ``action`` to ``vote/``, and we set ``method="post"``. - Using ``method="post"`` (as opposed to ``method="get"``) is very - important, because the act of submitting this form will alter data - server-side. Whenever you create a form that alters data server-side, use - ``method="post"``. This tip isn't specific to Django; it's just good Web - development practice. + * We set the form's ``action`` to ``/polls/{{ poll.id }}/vote/``, and we + set ``method="post"``. Using ``method="post"`` (as opposed to + ``method="get"``) is very important, because the act of submitting this + form will alter data server-side. Whenever you create a form that alters + data server-side, use ``method="post"``. This tip isn't specific to + Django; it's just good Web development practice. * ``forloop.counter`` indicates how many times the :ttag:`for` tag has gone through its loop @@ -173,11 +173,11 @@ bunch of our own code. We'll just have to take a few steps to make the conversion. We will: 1. Convert the URLconf. - + 2. Rename a few templates. - + 3. Delete some the old, now unneeded views. - + 4. Fix up URL handling for the new views. Read on for details.