'on_delete'

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

YOUTHS original programming STEAM finally released on 2018-12-14 10:02:48 Reads 1072 collection launched 

In learning Django, performs error TypeError python manage.py makemigrations learning_logs Times: __init __ () missing 1 required positional argument: 'on_delete' resolve property on_delete added in brackets = models.CASCADE to 

topic = models.ForeignKey(Topic, on_delete=models.CASCADE)

---------------- Disclaimer: This article is CSDN bloggers' Teenagers' program STEAM 'original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement. Original link: https: //blog.csdn.net/weixin_42274149/article/details/84998380

Guess you like

Origin www.cnblogs.com/fusiyilia/p/12272970.html