Admin
The admin panel is a user interface for managing the application, accessible through the browser. In the admin.py
file, we can add the model just created with the following command:
from models import Person admin.site.register(Person)
All the models can be accessed by a user interface at:
http://127.0.0.1:8000/admin/
At this link, the user name and password are required. We create that with the following command:
python manage.py createsuperuser
Then we type a username and password (in my case, andrea/a
).
Now, we can explore the panel that follows:
Clicking on Persons, we will see all Person
objects shown by name (because the__unicode__
function ...
Get Machine Learning for the Web now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.