I am trying to upgrade my django project to Django 2.0, and I have read the release notes and read several blog posts about what to change, but nothing addresses my problem so far, which relates to the package pinax:
File "/Users/marlo/miniconda3/envs/project/lib/python3.6/site-
packages/pinax/eventlog/models.py", line 13, in
class Log(models.Model):
File "/Users/marlo/miniconda3/envs/project/lib/python3.6/site-packages/pinax/eventlog/models.py", line 22, in Log
content_type = models.ForeignKey(ContentType, null=True)
TypeError: __init__() missing 1 required positional argument: 'on_delete'
Are there any fixes for this yet?
You'll want to update
pinax-eventlogto latest to pick up Django 2.0 compatibility, which is currently2.0.3.In your project's
requirements.txtfile add:pinax-eventlog==2.0.3So when you run
pip install -r requirements.txtthe right version will install. Otherwise, you can just runpip install pinax-eventlog==2.0.3.