Performing migrations using manage.py
One of the files generated for your Django project is manage.py
. You can see it in Figure 10.7.
Figure 10.7: The manage.py file provides utilities for working with your Django project so you don’t have to type in long commands or remember full paths
The purpose of the manage.py
task is to allow you to run Django-specific commands from the command line without having to remember the full path to your Django project or manually set up the Python environment. By using manage.py
, you ensure that the commands are executed within the correct Django project context.
Some common tasks you can perform with manage.py
include the following:
- Running the development server: You can start the Django development server using
manage.py runserver
. This allows you to test your application locally during development. Earlier, we ran the Django project using the generated run configuration. We could have also usedmanage...