summaryrefslogtreecommitdiff
path: root/docs/intro/tutorial04.txt
diff options
context:
space:
mode:
authorMarc Tamlyn <marc.tamlyn@gmail.com>2013-05-19 01:37:25 -0700
committerMarc Tamlyn <marc.tamlyn@gmail.com>2013-05-19 01:37:25 -0700
commit33c361ef9d882522aeae549a3a8c8b52ca5cfc5a (patch)
tree7c07f1f460ea123af7d9aa29ac6de254b423f9cc /docs/intro/tutorial04.txt
parentc70ca4879ee33fc4b70ad9a17d74b649f8f75487 (diff)
parenta4a761ada2286e0f08282efe8dffcd1b384c052c (diff)
Merge pull request #1129 from frog32/master
Add needed Imports to the Documentation
Diffstat (limited to 'docs/intro/tutorial04.txt')
-rw-r--r--docs/intro/tutorial04.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/intro/tutorial04.txt b/docs/intro/tutorial04.txt
index 9f54243a3e..f81a7d6758 100644
--- a/docs/intro/tutorial04.txt
+++ b/docs/intro/tutorial04.txt
@@ -136,6 +136,8 @@ object. For more on :class:`~django.http.HttpRequest` objects, see the
After somebody votes in a poll, the ``vote()`` view redirects to the results
page for the poll. Let's write that view::
+ from django.shortcuts import get_object_or_404, render
+
def results(request, poll_id):
poll = get_object_or_404(Poll, pk=poll_id)
return render(request, 'polls/results.html', {'poll': poll})