- 博客(2)
- 收藏
- 关注
转载 Django在根据models生成数据库表时报 __init__() missing 1 required positional argument: 'on_delete'
原因: 在django2.0后,定义外键和一对一关系的时候需要加on_delete选项,此参数为了避免两个表里的数据不一致问题,不然会报错: TypeError: init() missing 1 required positional argument: ‘on_delete’ 举例说明: user=models.OneToOneField(User) owner=models.ForeignK...
2019-03-26 20:25:02
139
转载 django.core.exceptions.ImproperlyConfigured:Passing a 3-tuple to include() is not supported.
django.core.exceptions.ImproperlyConfigured:Passing a 3-tuple to include() is not supported. #django.core.exceptions.ImproperlyConfigured:Passing a 3-tuple to include() is not supported. 安装的是Django2版本...
2019-03-26 20:24:19
759
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人