調用models.ForeignKey時報「TypeError: __init__() missing 1 required positional argument: 'on_delete'」

在運行 python manage.py makeigrations app_name時,若調用models.ForeignKey時參數裏除了對應的model沒有其餘參數時,會報「TypeError: __init__() missing 1 required positional argument: 'on_delete'」的錯誤。python 究其緣由,發如今virt_env\Lib\site
相關文章
相關標籤/搜索