Create a blog post Django model of learning

Create a blog post model and synchronized to the database:

1.

 

 2. Create a migration file:

python manage.py makemigrations

 

 0001_initial.py migration file is generated:

 

 3. synchronized to the database:

python manage.py migrate

 

 Thus, the model generating layer is completed.

Guess you like

Origin www.cnblogs.com/frantz/p/11487756.html