Hi all,

I'm using django-tagging for a Banner model and since it's fairly widely 
used I thought some people here may be able to help. I want to achieve 
two things: find all the Banners related to ALL of a list of tags, and 
final all the Banners related to ANY of a list of tags

This is my banner model (irrelevant bits excluded):

class Banner(models.Model):
    tag_objects = tagging.managers.ModelTaggedItemManager()
    tags = TagField()
tagging.register(Banner)

I have a single banner, with the tags 'listing', 'foo', and 'bar'.

But when I run this:
    Banner.tag_objects.with_all(('listing','joe'))
It returns the banner, when by my understanding it shouldn't.

It's returning the same result as:
    Banner.tag_objects.with_any(('listing','joe'))

Have I completely misunderstood how this is supposed to work?

Regards,
Andrew Ingram

--~--~---------~--~----~------------~-------~--~----~
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