TypeError: __init__() missing 1 required positional argument: 'on_delete'

改正:

models.py中

models.ForeignKey(x)改为models.ForeignKey(x,on_delete=models.CASCADE)
posted @ 2018-04-12 19:19  小夕公子  阅读(136)  评论(0编辑  收藏  举报