This section briefly describes how to use the Django shell interface and database API to quickly add a single Person object to the People table. The Django shell is a Python shell that gives you access to the database API included with Django. The database API is a set of Python methods that allow you to access the project database from the data model.
Try It Yourself: Add a Person Object to the iFriends DatabaseOpen the Django shell, and follow these steps to add yourself as a Person object in the People model of the iFriends database.
A Person object has now been created in the iFriends database. We will discuss accessing the database and using the database API in more depth later. |