Receive our weekly advanced programming tips for FREE
How to active the admin in django
| 0 votes
Autor: bookkeeper
Chapter: Django
The nicest feature about django is the build-in admin. To activate you need to do:

1. Change into a app folder for example "data"

2. Create a file "" and edit it

from django.contrib import admin
from import Entry Entry )

We tell django with ( which our models should appear in our admin

3. Edit the global and uncomment the admin parts

from django.conf.urls.defaults import *
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
urlpatterns = patterns('',
    (r'^', include('blog.apps.homepage.urls')),
    # Example:
    # (r'^blog/', include('')),
    # Uncomment the admin/doc line below to enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
    # Uncomment the next line to enable the admin:
    (r'^admin/', include(,

4. Edit the global

5. Uncomment the "django.contrib.admin" in INSTALLED_APPS

    # Uncomment the next line to enable the admin:

6. Run python syncdb, it will install the new admin tables

7. Start the dev server, python runserver

8. Point your browser to and login.

The admin is ready to use :)