From c6c25adf6d9f71ea11f61392f6f3d221f01e5216 Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Fri, 3 Apr 2009 18:30:54 +0000 Subject: Fixed a whole bunch of small docs typos, errors, and ommissions. Fixes #8358, #8396, #8724, #9043, #9128, #9247, #9267, #9267, #9375, #9409, #9414, #9416, #9446, #9454, #9464, #9503, #9518, #9533, #9657, #9658, #9683, #9733, #9771, #9835, #9836, #9837, #9897, #9906, #9912, #9945, #9986, #9992, #10055, #10084, #10091, #10145, #10245, #10257, #10309, #10358, #10359, #10424, #10426, #10508, #10531, #10551, #10635, #10637, #10656, #10658, #10690, #10699, #19528. Thanks to all the respective authors of those tickets. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10371 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/intro/tutorial04.txt | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'docs/intro/tutorial04.txt') diff --git a/docs/intro/tutorial04.txt b/docs/intro/tutorial04.txt index 5c2e1e8ec1..07aa477d67 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 ``/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. + * 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. * ``forloop.counter`` indicates how many times the :ttag:`for` tag has gone through its loop @@ -170,7 +170,17 @@ to write Python code to write an app. Let's convert our poll app to use the generic views system, so we can delete a bunch of our own code. We'll just have to take a few steps to make the -conversion. +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. .. admonition:: Why the code-shuffle? -- cgit v1.3