Ticket #12485: 12485.patch

File 12485.patch, 1.7 KB (added by Derek Willis, 14 years ago)
  • docs/intro/tutorial03.txt

    From bd922021ba991de52832c09eda35ad7c409959ee Mon Sep 17 00:00:00 2001
    From: Derek Willis <dwillis@gmail.com>
    Date: Wed, 10 Feb 2010 23:23:17 -0500
    Subject: [PATCH] added links to poll tutorial
    
    ---
     docs/intro/tutorial03.txt |    5 +++--
     docs/intro/tutorial04.txt |    2 ++
     2 files changed, 5 insertions(+), 2 deletions(-)
    
    diff --git a/docs/intro/tutorial03.txt b/docs/intro/tutorial03.txt
    index 1438a9e..692626b 100644
    a b Put the following code in that template:  
    261261    {% if latest_poll_list %}
    262262        <ul>
    263263        {% for poll in latest_poll_list %}
    264             <li>{{ poll.question }}</li>
     264            <li><a href="http://127.0.0.1:8000/polls/{{ poll.id }}/">{{ poll.question }}</a><</li>
    265265        {% endfor %}
    266266        </ul>
    267267    {% else %}
    Put the following code in that template:  
    269269    {% endif %}
    270270
    271271Load the page in your Web browser, and you should see a bulleted-list
    272 containing the "What's up" poll from Tutorial 1.
     272containing the "What's up" poll from Tutorial 1. The link points to the poll's
     273detail page.
    273274
    274275A shortcut: render_to_response()
    275276--------------------------------
  • docs/intro/tutorial04.txt

    diff --git a/docs/intro/tutorial04.txt b/docs/intro/tutorial04.txt
    index 70e012e..c778d67 100644
    a b Now, create a ``results.html`` template:  
    174174    {% endfor %}
    175175    </ul>
    176176
     177    <a href="http://127.0.0.1:8000/polls/{{ poll.id }}/">Vote again?</a>
     178
    177179Now, go to ``/polls/1/`` in your browser and vote in the poll. You should see a
    178180results page that gets updated each time you vote. If you submit the form
    179181without having chosen a choice, you should see the error message.
Back to Top