Clarified the bit in the tutorial about creating your first admin.py - fixes #8891

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9011 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Simon Willison 2008-09-11 02:57:31 +00:00
parent 1c78bf4b98
commit bc5cddc5c5
1 changed files with 5 additions and 5 deletions

View File

@ -97,17 +97,17 @@ Make the poll app modifiable in the admin
But where's our poll app? It's not displayed on the admin index page. But where's our poll app? It's not displayed on the admin index page.
Just one thing to do: We need to tell the admin that ``Poll`` Just one thing to do: We need to tell the admin that ``Poll``
objects have an admin interface. Edit the ``mysite/polls/admin.py`` file and objects have an admin interface. Create a file called ``admin.py`` in your
add the following to the bottom of the file:: ``polls`` application and edit it to look like this::
from mysite.polls.models import Poll from mysite.polls.models import Poll
from django.contrib import admin from django.contrib import admin
admin.site.register(Poll) admin.site.register(Poll)
Now reload the Django admin page to see your changes. Note that you don't have You will need to restart the development server to see your changes. Normally
to restart the development server -- the server will auto-reload your project, the server will auto-reload itself every time you modify a file, but here the
so any modifications code will be seen immediately in your browser. action of creating a new file will not trigger the auto-reloading logic.
Explore the free admin functionality Explore the free admin functionality
==================================== ====================================