The administration interface comes as a Django application. To activate it, we will follow a simple procedure that is similar to enabling the user authentication system.
The administration application is located in the django.contrib.admin
package. So the first step is adding the path of this package to the INSTALLED_APPS
variable. Open the settings.py
file, locate INSTALLED_APPS
, and edit it as follows:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.admin',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.comments',
'django_bookmarks.bookmarks',
)
Next, run the following command to create the necessary tables for the administration application:
$ python manage.py syncdb
Now we need to make the administration interface accessible from within our site by adding URL entries for it. The admin application defines many views (as we will see later), so manually adding a...