Closed Hugodby closed 6 years ago
Hello,
I am trying to setup pinax-blog on a Django 2.0 application. However I am not able to execute the migration.
File ".../venv/lib/python3.6/site-packages/pinax/blog/migrations/0001_initial.py", line 56, in Migration ('author', models.ForeignKey(related_name='posts', to=settings.AUTH_USER_MODEL)), TypeError: __init__() missing 1 required positional argument: 'on_delete'
If I understand correctly the ForeignKey field miss the on_delete argument used on newer Django version. https://docs.djangoproject.com/en/2.0/ref/models/fields/#django.db.models.ForeignKey.on_delete Should I open a PR ? Which value on_delete needs to be setted ? Thank you
Thanks @Hugodby , this is fixed in https://github.com/pinax/pinax-blog/pull/107. You can see the result in the most recent release, v7.0.0. https://pypi.python.org/pypi/pinax-blog.
Hello,
I am trying to setup pinax-blog on a Django 2.0 application. However I am not able to execute the migration.
If I understand correctly the ForeignKey field miss the on_delete argument used on newer Django version. https://docs.djangoproject.com/en/2.0/ref/models/fields/#django.db.models.ForeignKey.on_delete Should I open a PR ? Which value on_delete needs to be setted ? Thank you