Question

I'm using django-tagging, and am trying to retrieve a list of tags for a specific queryset. Here's what I've got:

tag      = Tag.objects.get(name='tag_name')
queryset = TaggedItem.objects.get_by_model(Article, tag)
tags     = Tag.objects.usage_for_queryset(queryset, counts=True)

"queryset" appropriately returns a number of articles that have been tagged with the tag 'tag_name', but when I attempt to retrieve all of the tags for that queryset, "tags" returns a complete list of all tags for that model.

Anyone else run into this before, or is this a bug in django-tagging?

Was it helpful?

Solution

This appears to be a bug in django-tagging. A patch has been written, but it has not yet been committed to trunk. Find the patch here:

http://code.google.com/p/django-tagging/issues/detail?id=44

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top