Locked lesson.
About this lesson
Databases involve a two-step process: migration, and pushing the migration to a database. In this lesson, we'll cover both steps of this process for your new project.
Exercise files
Download this lesson’s related exercise files.
Migrate Database For Admin Area And Create Superuser.docx57.3 KB Migrate Database For Admin Area And Create Superuser - Solution.docx
55.7 KB
Quick reference
Migrate Database For Admin Area And Create Superuser
In this video we'll learn how to Migrate the Django Database and Create a Superuser for the Django Admin area.
When to use
Whenever you create a new project, you always want to migrate the server right away, and create a super user for the Django admin area.
Instructions
To migrate a Django database, use the command:
python manage.py migrate
To create a super user, use the command:
winpty python manage.py createsuperuser
To view the Django Admin area, navigate your web browser to:
http://localhost:8000/admin
Hints & tips
- python manage.py migrate
- winpty python manage.py createsuperuser
- http://localhost:8000/admin
Lesson notes are only available for subscribers.