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

Django 3.1: models.py: missing 1 required positional argument: 'on_delete' #17

Open
brezerk opened this issue Sep 6, 2020 · 0 comments

Comments

@brezerk
Copy link

brezerk commented Sep 6, 2020

Hi

Seems like there is on_delete field missing in twython_django_oauth/models.py:

  File "/home/brezerk/develop/example/.venv/lib/python3.6/site-packages/twython_django_oauth/models.py", line 5, in <module>
    class TwitterProfile(models.Model):
  File "/home/brezerk/develop/example/.venv/lib/python3.6/site-packages/twython_django_oauth/models.py", line 11, in TwitterProfile
    user = models.OneToOneField(User)
TypeError: __init__() missing 1 required positional argument: 'on_delete'

https://docs.djangoproject.com/en/3.1/ref/models/fields/#django.db.models.ForeignKey.on_delete

@brezerk brezerk changed the title Django 1.3: models.py: missing 1 required positional argument: 'on_delete' Django 3.1: models.py: missing 1 required positional argument: 'on_delete' Sep 6, 2020
brezerk added a commit to brezerk/twython-django that referenced this issue Sep 6, 2020
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

1 participant