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:
|
261 | 261 | {% if latest_poll_list %} |
262 | 262 | <ul> |
263 | 263 | {% 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> |
265 | 265 | {% endfor %} |
266 | 266 | </ul> |
267 | 267 | {% else %} |
… |
… |
Put the following code in that template:
|
269 | 269 | {% endif %} |
270 | 270 | |
271 | 271 | Load the page in your Web browser, and you should see a bulleted-list |
272 | | containing the "What's up" poll from Tutorial 1. |
| 272 | containing the "What's up" poll from Tutorial 1. The link points to the poll's |
| 273 | detail page. |
273 | 274 | |
274 | 275 | A shortcut: render_to_response() |
275 | 276 | -------------------------------- |
diff --git a/docs/intro/tutorial04.txt b/docs/intro/tutorial04.txt
index 70e012e..c778d67 100644
a
|
b
|
Now, create a ``results.html`` template:
|
174 | 174 | {% endfor %} |
175 | 175 | </ul> |
176 | 176 | |
| 177 | <a href="http://127.0.0.1:8000/polls/{{ poll.id }}/">Vote again?</a> |
| 178 | |
177 | 179 | Now, go to ``/polls/1/`` in your browser and vote in the poll. You should see a |
178 | 180 | results page that gets updated each time you vote. If you submit the form |
179 | 181 | without having chosen a choice, you should see the error message. |