summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2014-09-17 08:37:27 -0400
committerTim Graham <timograham@gmail.com>2014-09-17 08:37:27 -0400
commit54fd84e43230bc739160b680c5ba51542e2e6e7d (patch)
tree978b78d3781bb63ea163afcde4315074638b060a /docs
parentab8248361e0a7b4fc7684eaaa5891e16b8562683 (diff)
Fixed #23491 -- Clarified tutorial 3.
Thanks diek for the suggestion.
Diffstat (limited to 'docs')
-rw-r--r--docs/intro/tutorial03.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/intro/tutorial03.txt b/docs/intro/tutorial03.txt
index 54cc019150..7b40062f28 100644
--- a/docs/intro/tutorial03.txt
+++ b/docs/intro/tutorial03.txt
@@ -287,7 +287,7 @@ you want, using whatever Python libraries you want.
All Django wants is that :class:`~django.http.HttpResponse`. Or an exception.
Because it's convenient, let's use Django's own database API, which we covered
-in :doc:`Tutorial 1 </intro/tutorial01>`. Here's one stab at the ``index()``
+in :doc:`Tutorial 1 </intro/tutorial01>`. Here's one stab at a new ``index()``
view, which displays the latest 5 poll questions in the system, separated by
commas, according to publication date:
@@ -304,6 +304,8 @@ commas, according to publication date:
output = ', '.join([p.question_text for p in latest_question_list])
return HttpResponse(output)
+ # Leave the rest of the views (detail, results, vote) unchanged
+
There's a problem here, though: the page's design is hard-coded in the view. If
you want to change the way the page looks, you'll have to edit this Python code.
So let's use Django's template system to separate the design from Python by