pinax / django-flag

flagging of inapproriate/spam content
MIT License
74 stars 44 forks source link

doesn't work with newer Django #11

Open fredfalcon opened 7 years ago

fredfalcon commented 7 years ago

File "....django-flag\flag\models.py", line 7, in from django.contrib.contenttypes import generic ImportError: cannot import name generic

KatherineMichel commented 5 years ago

Sorry for the late response. django.contrib.contenttypes was deprecated with Django 1.7 and this app has not been updated in some time. Happy to accept assistance in updating, if you have the time and inclination. We have some info in our wiki about our most recent process. https://github.com/pinax/pinax/wiki/Pinax-19.xx-Proposed-Process

morenoh149 commented 5 years ago

seems like we replace that line with from django.contrib.contenttypes.fields import GenericForeignKey ?

from django.contrib.contenttypes.fields import GenericForeignKey

class FlaggedContent(models.Model):
...
    content_object = GenericForeignKey('content_type', 'object_id')

I might submit a patch