首先要编写好自己的model
from django.db import models
# Create your models here.
class Article(models.Model):
title = models.CharField(max_length=32,default='Title')
content = models.TextField(null=True)
然后
步骤:
命令行中进入 manage.py同级目录
执行python manage.py makemigratetions app名(可选)
在执行python manage.py migrate