执行python manage.py makemigrations时报错(装载)

原文:https://blog.csdn.net/hello__jerry/article/details/79531532

在执行python manage.py makemigrations时报错:
TypeError: __init__() missing 1 required positional argument: ‘on_delete’
解决方法:
在连接外键时加上:

on_delete=models.CASCADE
0 0 vote
Article Rating
Subscribe
提醒
guest
0 评论
Inline Feedbacks
View all comments