Commit 056afc30 by Jacek Tomaszewski

Add related attribute to TaggableManager (close #114).

parent 826850c5
......@@ -83,6 +83,7 @@ class TaggableManager(RelatedField):
self.through is None or issubclass(self.through, GenericTaggedItemBase)
)
self.rel.to = self.through._meta.get_field("tag").rel.to
self.related = RelatedObject(self.through, cls, self)
if self.use_gfk:
tagged_items = GenericRelation(self.through)
tagged_items.contribute_to_class(cls, "tagged_items")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment