From ffbe4730f0fa71fdaf8cd714c3a79f0860ddfd05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Luiz=20Lorencetti?= Date: Sun, 3 Apr 2016 16:18:57 -0300 Subject: [PATCH] The destination of the ParentalKey should be a subclass of ClusterableModel --- docs/topics/snippets.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/topics/snippets.rst b/docs/topics/snippets.rst index 82dae33c6..2fcc61908 100644 --- a/docs/topics/snippets.rst +++ b/docs/topics/snippets.rst @@ -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)