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

on_delete issue #65

Open
FabriceSalvaire opened this issue Mar 13, 2019 · 2 comments
Open

on_delete issue #65

FabriceSalvaire opened this issue Mar 13, 2019 · 2 comments

Comments

@FabriceSalvaire
Copy link

  File "/home/www/django/home-page-cms/cmsplugin_contact_plus/models.py", line 107, in ExtraField
    form = models.ForeignKey(ContactPlus, verbose_name=_("Contact Form"))
TypeError: __init__() missing 1 required positional argument: 'on_delete'

added , on_delete=models.CASCADE as quick fix

@tehfink
Copy link

tehfink commented Mar 25, 2020

Patched version for 1.3.16 here: https://github.com/atiberghien/cmsplugin-contact-plus

@ludo-q
Copy link

ludo-q commented Oct 29, 2020

Hello!

I'm having the same problem, I have installed the last version using:
pip install -e git+git://github.com/arteria/cmsplugin-contact-plus.git#egg=cmsplugin_contact_plus

But when execute: python manage.py migrate

Traceback (most recent call last):
  File "manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "C:\Users\User\Workspace\rash.al\env\lib\site-packages\django\core\management\__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "C:\Users\User\Workspace\rash.al\env\lib\site-packages\django\core\management\__init__.py", line 357, in execute
    django.setup()
  File "C:\Users\User\Workspace\rash.al\env\lib\site-packages\django\__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "C:\Users\User\Workspace\rash.al\env\lib\site-packages\django\apps\registry.py", line 114, in populate
    app_config.import_models()
  File "C:\Users\User\Workspace\rash.al\env\lib\site-packages\django\apps\config.py", line 211, in import_models
    self.models_module = import_module(models_module_name)
  File "C:\Python36\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "c:\users\user\workspace\rash.al\env\src\cmsplugin-contact-plus\cmsplugin_contact_plus\models.py", line 104, in <module>
    class ExtraField(SortableMixin):
  File "c:\users\user\workspace\rash.al\env\src\cmsplugin-contact-plus\cmsplugin_contact_plus\models.py", line 107, in ExtraField
    form = models.ForeignKey(ContactPlus, verbose_name=_("Contact Form"))
TypeError: __init__() missing 1 required positional argument: 'on_delete'

I'm using:

Django==2.2.16
django-cms==3.7.0
django-admin-sortable==2.2.3

Can someone help me?

tehfink added a commit to tehfink/cmsplugin-contact-plus that referenced this issue Jun 7, 2022
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

3 participants