The destination of the ParentalKey should be a subclass of ClusterableModel

This commit is contained in:
João Luiz Lorencetti 2016-04-03 16:18:57 -03:00 committed by Karl Hobley
parent a0af3d6685
commit ffbe4730f0

View file

@ -213,6 +213,7 @@ Adding tags to snippets is very similar to adding tags to pages. The only differ
.. code-block:: python
from modelcluster.fields import ParentalKey
from modelcluster.models import ClusterableModel
from taggit.models import TaggedItemBase
from taggit.managers import TaggableManager
@ -220,7 +221,7 @@ Adding tags to snippets is very similar to adding tags to pages. The only differ
content_object = ParentalKey('demo.Advert', related_name='tagged_items')
@register_snippet
class Advert(models.Model):
class Advert(ClusterableModel):
...
tags = TaggableManager(through=AdvertTag, blank=True)