Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #10801 -- Reverted a portion of [10371]. Practicality beats pur…

…ity in this case. Thanks to bruce@z2a.org for the report. Refs #9771.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10973 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 8765615b9b365ed2ee822c1757cc00a9a2813b16 1 parent 6ad26e6
Russell Keith-Magee authored June 10, 2009

Showing 1 changed file with 10 additions and 10 deletions. Show diff stats Hide diff stats

  1. 20  docs/intro/tutorial04.txt
20  docs/intro/tutorial04.txt
@@ -20,7 +20,7 @@ tutorial, so that the template contains an HTML ``<form>`` element:
20 20
 
21 21
     {% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}
22 22
 
23  
-    <form action="vote/" method="post">
  23
+    <form action="/polls/{{ poll.id }}/vote/" method="post">
24 24
     {% for choice in poll.choice_set.all %}
25 25
         <input type="radio" name="choice" id="choice{{ forloop.counter }}" value="{{ choice.id }}" />
26 26
         <label for="choice{{ forloop.counter }}">{{ choice.choice }}</label><br />
@@ -36,12 +36,12 @@ A quick rundown:
36 36
       selects one of the radio buttons and submits the form, it'll send the
37 37
       POST data ``choice=3``. This is HTML Forms 101.
38 38
 
39  
-    * We set the form's ``action`` to ``vote/``, and we set ``method="post"``.
40  
-      Using ``method="post"`` (as opposed to ``method="get"``) is very
41  
-      important, because the act of submitting this form will alter data
42  
-      server-side. Whenever you create a form that alters data server-side, use
43  
-      ``method="post"``. This tip isn't specific to Django; it's just good Web
44  
-      development practice.
  39
+    * We set the form's ``action`` to ``/polls/{{ poll.id }}/vote/``, and we
  40
+      set ``method="post"``. Using ``method="post"`` (as opposed to
  41
+      ``method="get"``) is very important, because the act of submitting this
  42
+      form will alter data server-side. Whenever you create a form that alters
  43
+      data server-side, use ``method="post"``. This tip isn't specific to
  44
+      Django; it's just good Web development practice.
45 45
 
46 46
     * ``forloop.counter`` indicates how many times the :ttag:`for` tag has gone
47 47
       through its loop
@@ -173,11 +173,11 @@ bunch of our own code. We'll just have to take a few steps to make the
173 173
 conversion. We will:
174 174
 
175 175
     1. Convert the URLconf.
176  
-    
  176
+
177 177
     2. Rename a few templates.
178  
-    
  178
+
179 179
     3. Delete some the old, now unneeded views.
180  
-    
  180
+
181 181
     4. Fix up URL handling for the new views.
182 182
 
183 183
 Read on for details.

0 notes on commit 8765615

Please sign in to comment.
Something went wrong with that request. Please try again.