执行python manage.py makemigrations时报错TypeError: __init__() missing 1 required positional argument: 'on_delete'
在执行python manage.py makemigrations时报错:
TypeError: __init__() missing 1 required positional argument: 'on_delete'
解决方法:
在连接外键时加上:
on_delete=models.CASCADE
Win a contest, win a challenge
posted on 2018-04-14 11:10 pandaboy1123 阅读(283) 评论(0) 编辑 收藏 举报