Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #17024 -- Added import statements in tutorial code sample

  • Loading branch information...
commit c446bdee84efe42f5c0bbfee16986a80c83ec9a2 1 parent 2c2c8a6
@claudep claudep authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 docs/intro/tutorial02.txt
View
5 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

0 comments on commit c446bde

Please sign in to comment.
Something went wrong with that request. Please try again.