summaryrefslogtreecommitdiff
path: root/docs/intro/tutorial02.txt
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2012-06-30 20:50:24 +0200
committerClaude Paroz <claude@2xlibre.net>2012-06-30 20:52:49 +0200
commitc446bdee84efe42f5c0bbfee16986a80c83ec9a2 (patch)
tree2c2a7a6df4c548ff983237efe4052fe169183d4f /docs/intro/tutorial02.txt
parent2c2c8a63266b586e3782267fb361504e5ac05abe (diff)
Fixed #17024 -- Added import statements in tutorial code sample
Diffstat (limited to 'docs/intro/tutorial02.txt')
-rw-r--r--docs/intro/tutorial02.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/docs/intro/tutorial02.txt b/docs/intro/tutorial02.txt
index 0d95f6ff37..dd315ed8a7 100644
--- a/docs/intro/tutorial02.txt
+++ b/docs/intro/tutorial02.txt
@@ -113,8 +113,8 @@ Just one thing to do: We need to tell the admin that ``Poll``
objects have an admin interface. To do this, create a file called
``admin.py`` in your ``polls`` directory, and edit it to look like this::
- from polls.models import Poll
from django.contrib import admin
+ from polls.models import Poll
admin.site.register(Poll)
@@ -283,6 +283,9 @@ It'd be better if you could add a bunch of Choices directly when you create the
Remove the ``register()`` call for the ``Choice`` model. Then, edit the ``Poll``
registration code to read::
+ from django.contrib import admin
+ from polls.models import Poll
+
class ChoiceInline(admin.StackedInline):
model = Choice
extra = 3