django-flag icon indicating copy to clipboard operation
django-flag copied to clipboard

doesn't work with newer Django

Open fredfalcon opened this issue 9 years ago • 3 comments

fredfalcon avatar Dec 28 '16 01:12 fredfalcon

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

fredfalcon avatar Dec 28 '16 01:12 fredfalcon

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

KatherineMichel avatar Jul 17 '19 05:07 KatherineMichel

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

morenoh149 avatar Aug 02 '19 05:08 morenoh149