Forums

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

I got this in
/var/www/canya1607_pythonanywhere_com_wsgi.py

Error in my log file looks like this 2018-02-20 00:34:21,460: Error running WSGI application 2018-02-20 00:34:21,477: TypeError: init() missing 1 required positional argument: 'on_delete' 2018-02-20 00:34:21,478: File "/var/www/canya1607_pythonanywhere_com_wsgi.py", line 12, in <module> 2018-02-20 00:34:21,478: application = DjangoWhiteNoise(get_wsgi_application())

My wsgi file consist of this import os import sys

path = '/home/Canya1607/Cases' # use your own username here if path not in sys.path: sys.path.append(path)

os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'

from django.core.wsgi import get_wsgi_application from whitenoise.django import DjangoWhiteNoise

application = DjangoWhiteNoise(get_wsgi_application())

sounds like you have a model that's incorrect and missing the on_delete parameter for one of the fields