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

review modles is missing an on_delete positional argument #51

Open
standaloneSA opened this issue Apr 26, 2019 · 1 comment
Open

review modles is missing an on_delete positional argument #51

standaloneSA opened this issue Apr 26, 2019 · 1 comment

Comments

@standaloneSA
Copy link

New generic install from both PyPi and Github result in an error when running

python manage.py runserver:

`
File "/home/bandman/code/findscience/env/lib/python3.6/site-packages/review/models.py", line 22, in

class Review(models.Model):

File "/home/bandman/code/findscience/env/lib/python3.6/site-packages/review/models.py", line 42, in Review

content_type = models.ForeignKey(ContentType)

TypeError: init() missing 1 required positional argument: 'on_delete'
`

@frsilent
Copy link

frsilent commented May 8, 2019

This is the result of Django > 2.0 requiring the on_delete argument. Several changes need to happen for it to work on the latest Django version. I noticed these ones:

  • The on_delete arguments set for FKs
  • Changing the view to import from django.urls, I'm sure other similarly moved dependencies will need to be changed as well
  • Fixing the lazy images reference to user_media
  • Changing assignment_tag to simple_tag

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