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

RemovedInDjango20Warning: on_delete will be a required arg for OneToOneField in Django 2.0. #183

Closed
martinburchell opened this issue Jun 26, 2017 · 0 comments

Comments

@martinburchell
Copy link

Getting this warning with Django 1.11.1
I'm guessing if nothing else we should set on_delete to CASCADE as they suggest

/site-packages/silk/migrations/0001_initial.py:63:
RemovedInDjango20Warning:
on_delete will be a required arg for OneToOneField in Django 2.0.
Set it to models.CASCADE on models and in existing migrations if you want to maintain the current default behavior.
See https://docs.djangoproject.com/en/1.11/ref/models/fields/#django.db.models.ForeignKey.on_delete
('request', models.OneToOneField(to='silk.Request', related_name='response')),

/site-packages/silk/migrations/0001_initial.py:75:
RemovedInDjango20Warning:
on_delete will be a required arg for ForeignKey in Django 2.0.
Set it to models.CASCADE on models and in existing migrations if you want to maintain the current default behavior.
See https://docs.djangoproject.com/en/1.11/ref/models/fields/#django.db.models.ForeignKey.on_delete
('request', models.ForeignKey(to='silk.Request', blank=True, null=True, related_name='queries')),

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

No branches or pull requests

2 participants