Remote Q & A

2019-12-06

# Application three-step model
1. Configure
- Create a database first
-app To register
- database user must have permission to create a database
__init__.py to be modified

2. Write a class model

3, create a migration manage.py makemigrations appname Python
# just to be a record, not touch the database
4, the database application migration is really the essence of operation, build tables / Modify table

python manage.py migrate

django project, touch the database run-off makemigrations

If you re-create a django project, you must re-create the virtual environment python

Guess you like

Origin www.cnblogs.com/youshiqiezhenxi/p/12000058.html