I've been using the -Wd
argument for Python and discovered tons of changes I need to make in order to prepare my upgrade to Django 2.0
python -Wd manage.py runserver
The main thing is that on_delete
is due to become a required argument.
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.9/ref/models/fields/#django.db.models.ForeignKey.on_delete
Is there an easy regex (or way) I can use to put on_delete
into all of my foreign keys?