Skip to content

Instantly share code, notes, and snippets.

@loic loic/foo.diff
Created May 1, 2014

What would you like to do?
diff --git a/mezzanine/generic/ b/mezzanine/generic/
index 8d8dd94..e95de37 100644
--- a/mezzanine/generic/
+++ b/mezzanine/generic/
@@ -134,6 +134,12 @@ class BaseGenericRelation(GenericRelation):
+ def value_from_object(self, obj):
+ """
+ Returns the value of this field in the given model instance.
+ """
+ return getattr(obj, self.attname).all()
class CommentsField(BaseGenericRelation):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.