By default, INSTALLED_APPS
contains django.contrib.admin
and django.contrib.auth
apps (along with few other apps). These apps are part of Django. These apps are optional, and can be removed if you do not need functionality they provide (See: Run django application without django.contrib.admin ).
python manage.py makemigrations
will create the migrations files for all the changes to models in all the apps .
Andpython manage.py migrate
will apply previously computed migrations to the database.
When you have multiple apps, use python manage.py makemigrations [app_name]
, and python manage.py migrate [app_name]
to limit these operations to specific app.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.