We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
File "/srv/venv/lib/python3.5/site-packages/flatcontent/models.py", line 13, in FlatContent site = models.ForeignKey(Site, blank=True, null=True) TypeError: init() missing 1 required positional argument: 'on_delete'
File "/srv/venv/lib/python3.5/site-packages/flatcontent/migrations/0001_initial.py", line 20, in Migration ('site', models.ForeignKey(to='sites.Site', null=True, blank=True)), TypeError: init() missing 1 required positional argument: 'on_delete'
add on_delete=models.PROTECT to the foreign key arguments
on_delete=models.PROTECT
Source
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Location 1
File "/srv/venv/lib/python3.5/site-packages/flatcontent/models.py", line 13, in FlatContent
site = models.ForeignKey(Site, blank=True, null=True)
TypeError: init() missing 1 required positional argument: 'on_delete'
Location 2
File "/srv/venv/lib/python3.5/site-packages/flatcontent/migrations/0001_initial.py", line 20, in Migration
('site', models.ForeignKey(to='sites.Site', null=True, blank=True)),
TypeError: init() missing 1 required positional argument: 'on_delete'
Location 3
File "/srv/venv/lib/python3.5/site-packages/flatcontent/migrations/0001_initial.py", line 20, in Migration
('site', models.ForeignKey(to='sites.Site', null=True, blank=True)),
TypeError: init() missing 1 required positional argument: 'on_delete'
Fix (Disclaimer: Not acquainted with the possible repercussions)
add
on_delete=models.PROTECT
to the foreign key argumentsSource
The text was updated successfully, but these errors were encountered: