From 1fb4774474207933a6cce19e65a2fa011593b3eb Mon Sep 17 00:00:00 2001 From: Joseph Spiros Date: Wed, 17 Oct 2012 09:52:57 -0400 Subject: [PATCH 1/1] Added a proper related_name argument to the GenericRelation from Entity to Attribute. This fixes #179. --- philo/models/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/philo/models/base.py b/philo/models/base.py index e7918f5..8aef89a 100644 --- a/philo/models/base.py +++ b/philo/models/base.py @@ -284,7 +284,7 @@ class Entity(models.Model): """An abstract class that simplifies access to related attributes. Most models provided by Philo subclass Entity.""" __metaclass__ = EntityBase - attribute_set = generic.GenericRelation(Attribute, content_type_field='entity_content_type', object_id_field='entity_object_id') + attribute_set = generic.GenericRelation(Attribute, content_type_field='entity_content_type', object_id_field='entity_object_id', related_name='%(app_label)s_%(class)s_set') def get_attribute_mapper(self, mapper=AttributeMapper): """ -- 2.20.1