From 803270e1a74ce1d491624b826eb95e548fa97b89 Mon Sep 17 00:00:00 2001 From: Daniel Lindsley Date: Wed, 7 Sep 2011 15:43:44 -0500 Subject: [PATCH] Turns out syntax is important too. --- docs/fields.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/fields.rst b/docs/fields.rst index adade5d8d..59b6f46ae 100644 --- a/docs/fields.rst +++ b/docs/fields.rst @@ -258,7 +258,7 @@ This field also has special behavior when dealing with ``attribute`` in that it can take a callable. For instance, if you need to filter the reverse relation, you can do something like:: - subjects = fields.ToManyField(SubjectResource, attribute=lambda bundle: Subject.objects.filter(notes=bundle.obj, name__startswith='Personal') + subjects = fields.ToManyField(SubjectResource, attribute=lambda bundle: Subject.objects.filter(notes=bundle.obj, name__startswith='Personal')) Note that the ``hydrate`` portions of this field are quite different than any other field. ``hydrate_m2m`` actually handles the data and relations.