from django.db import models # Create your models here. class Category(models.Model): caption = models.CharField(max_length=) class ArticleType(models.Model): caption = models.CharField(max_length=) class Article(models.Model): title = models.CharFie…
最近在使用Python的Django框架开发web站点,通过models.py文件建表后,执行数据库迁移(命令行:mange.py makemigrations)时报错,下面是查看官方文档后找到的解决方案. 官方文档:Model field reference 报错内容: class Guest(models.Model): File "C:\Users\dell\guest\sign\models.py", line 18, in Guest event = models.Forei…