http://docs.djangoproject.com/en/dev/ref/contrib/contenttypes/#reverse-generic-relations

I'm working with Reverse Generic Relations and I was wondering if
there is a way to get the related objects for multiple objects in a
simple way.  For instance, based on the bookmark example of that link,
I'd like to do the following:

>>> b.objects.filter(pk__in=[1,2])
>>> b.tags.all()
*** AttributeError: 'QuerySet' object has no attribute 'tags'

First off, it's an annoying error because it should say something like
'more than one object b'.  Anyway, I can iterate through each b and
then get the tags for that b and then put them back together again.
Is there a simpler way to do this (i.e. get all tags for more than one
bookmark)?

Thanks.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to