python manage.py migrate
Traceback (most recent call last):
File "manage.py", line 21, in
main()
File "manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "/Users/shaikaf/PycharmProjects/demonaren/venvnew/lib/python3.8/site-packages/django/core/management/init.py", line 401, in execute_from_command_line
utility.execute()
File "/Users/shaikaf/PycharmProjects/demonaren/venvnew/lib/python3.8/site-packages/django/core/management/init.py", line 377, in execute
django.setup()
File "/Users/shaikaf/PycharmProjects/demonaren/venvnew/lib/python3.8/site-packages/django/init.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/Users/shaikaf/PycharmProjects/demonaren/venvnew/lib/python3.8/site-packages/django/apps/registry.py", line 114, in populate
app_config.import_models()
File "/Users/shaikaf/PycharmProjects/demonaren/venvnew/lib/python3.8/site-packages/django/apps/config.py", line 211, in import_models
self.models_module = import_module(models_module_name)
File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 783, in exec_module
File "", line 219, in _call_with_frames_removed
File "/Users/shaikaf/PycharmProjects/demonaren/venvnew/lib/python3.8/site-packages/djadmin/models.py", line 19, in
class Visitor(models.Model):
File "/Users/shaikaf/PycharmProjects/demonaren/venvnew/lib/python3.8/site-packages/djadmin/models.py", line 23, in Visitor
name = models.ForeignKey(AUTH_USER_MODEL, verbosename=('User'), null=True)
TypeError: init() missing 1 required positional argument: 'on_delete'
File "F:\project2\api\models.py", line 14, in
class Student(models.Model):
File "F:\project2\api\models.py", line 17, in Student
university=models.ForeignKey(University)
TypeError: init() missing 1 required positional argument: 'on_delete'
python manage.py migrate
main()
File "manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "/Users/shaikaf/PycharmProjects/demonaren/venvnew/lib/python3.8/site-packages/django/core/management/init.py", line 401, in execute_from_command_line
utility.execute()
File "/Users/shaikaf/PycharmProjects/demonaren/venvnew/lib/python3.8/site-packages/django/core/management/init.py", line 377, in execute
django.setup()
File "/Users/shaikaf/PycharmProjects/demonaren/venvnew/lib/python3.8/site-packages/django/init.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/Users/shaikaf/PycharmProjects/demonaren/venvnew/lib/python3.8/site-packages/django/apps/registry.py", line 114, in populate
app_config.import_models()
File "/Users/shaikaf/PycharmProjects/demonaren/venvnew/lib/python3.8/site-packages/django/apps/config.py", line 211, in import_models
self.models_module = import_module(models_module_name)
File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 783, in exec_module
File "", line 219, in _call_with_frames_removed
File "/Users/shaikaf/PycharmProjects/demonaren/venvnew/lib/python3.8/site-packages/djadmin/models.py", line 19, in
class Visitor(models.Model):
File "/Users/shaikaf/PycharmProjects/demonaren/venvnew/lib/python3.8/site-packages/djadmin/models.py", line 23, in Visitor
name = models.ForeignKey(AUTH_USER_MODEL, verbosename=('User'), null=True)
TypeError: init() missing 1 required positional argument: 'on_delete'
Traceback (most recent call last): File "manage.py", line 21, in