shellfly / django-vote

Simple vote for django
http://django-vote.readthedocs.io
Apache License 2.0
158 stars 49 forks source link

Django 2.0 error #60

Closed philippeluickx closed 6 years ago

philippeluickx commented 6 years ago

After upgrading django to 2.0, I get this error:

File "/home/x/y/.venvs/z/lib/python3.6/site-packages/vote/models.py", line 31, in Vote
    content_type = models.ForeignKey(ContentType)
TypeError: __init__() missing 1 required positional argument: 'on_delete'
philippeluickx commented 6 years ago

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

class ForeignKey(to, on_delete, **options)[source]¶ A many-to-one relationship. Requires two positional arguments: the class to which the model is related and the on_delete option.

philippeluickx commented 6 years ago

Any chance of a new release on pypi, then we can close this? Thanks!

shellfly commented 6 years ago

Done django-vote==2.1.6