coala / community

Generic re-usable community site
https://coala-community.netlify.app
GNU Affero General Public License v3.0
19 stars 45 forks source link

Add support for Django 2.x #182

Closed sks444 closed 6 years ago

sks444 commented 6 years ago

We were initially using Django 2.x but at that time django-distill doesn't has the support for the same, so we downgraded to a lesser version. But as replied at this issue they have fixed the problem. So, I think we could update this repo to use Django 2.x with some minor changes.

sks444 commented 6 years ago

Travis Error when using Django 2.x:

  File "/home/travis/build/sks444/community/gsoc/models.py", line 19, in <module>
    class GsocOccurrence(BaseOccurrence):
  File "/home/travis/build/sks444/community/gsoc/models.py", line 20, in GsocOccurrence
    event = models.ForeignKey(GsocEvent)
TypeError: __init__() missing 1 required positional argument: 'on_delete'

I think the changes needed to support Django 2.x is to add on_delete parameter to model fields when using ForeignKey and OneToOne Fields.