在執行python manage.py makemigrations時報錯:
TypeError: __init__() missing 1 required positional argument: 'on_delete'
解決方法:
在連接外鍵時加上:
on_delete=models.CASCADE
在執行python manage.py makemigrations時報錯:
TypeError: __init__() missing 1 required positional argument: 'on_delete'
解決方法:
在連接外鍵時加上:
on_delete=models.CASCADE