Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
xmzhangs opened this issue Dec 11, 2023 · 1 comment

Comments

@xmzhangs
Copy link

Traceback (most recent call last):
File "C:\Users\40690\PycharmProjects\flea-market-master\manage.py", line 10, in
execute_from_command_line(sys.argv)
File "C:\Users\40690\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\management_init_.py", line 442, in execute_from_command_line
utility.execute()
File "C:\Users\40690\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\management_init_.py", line 416, in execute
django.setup()
File "C:\Users\40690\AppData\Local\Programs\Python\Python39\lib\site-packages\django_init_.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "C:\Users\40690\AppData\Local\Programs\Python\Python39\lib\site-packages\django\apps\registry.py", line 116, in populate
app_config.import_models()
File "C:\Users\40690\AppData\Local\Programs\Python\Python39\lib\site-packages\django\apps\config.py", line 269, in import_models
self.models_module = import_module(models_module_name)
File "C:\Users\40690\AppData\Local\Programs\Python\Python39\lib\importlib_init_.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "C:\Users\40690\PycharmProjects\flea-market-master\login\models.py", line 24, in
class AuthGroupPermissions(models.Model):
File "C:\Users\40690\PycharmProjects\flea-market-master\login\models.py", line 26, in AuthGroupPermissions
group = models.ForeignKey(AuthGroup)
TypeError: init() missing 1 required positional argument: 'on_delete'

这个是什么问题,怎么解决?

@mazhenwei793
Copy link

你好,你这个问题解决了吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants