What You'll Learn in This Hour |
|
In Hour 2, "Creating Your First Website," you went through the steps to create a basic Django website. As part of that process, you created a simple application and model. In this hour, you will activate and install Django's admin interface so that you will be able to manage the data in the models from the web. This hour also provides more details on creating and managing models, including some of the different types of fields that you can add to a model and which options are available to control the behavior of those fields.
Django's admin interface is actually a Django application. Therefore, it must be installed just like any other application you create. Installing Django's admin interface is a simple process of adding the application to the list of installed applications in the settings.py file and then synching the database. This process creates new tables in the database to support the admin interface.
Try It Yourself: Install the Admin Interface as an ApplicationIn this section, you install the admin interface in your iFriends project.
|
By the Way
The first time you run the syncdb utility, you are asked to create a superuser, which is required to access the Django admin site. If you don't create a superuser at that point, you can create one at any time by running the following utility:
djanngo/contrib/auth/bin/create_superuser.py