Skip to content
This repository has been archived by the owner on Jun 17, 2018. It is now read-only.

Changed the TagManager.usage_for_queryset method. #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

katiam
Copy link

@katiam katiam commented Jan 27, 2011

TagManager.usage_for_queryset obtains a list of tags associated with instances of a model contained in the given queryset.
I needed to filter the result so that Tag.name contains "text".
So I added tag_queryset argument to TagManager.usage_for_queryset and used it's "where" part as extra criteria for TagManager._get_usage() method.
So I use the new argument like this:
Tag.objects.usage_for_queryset(queryset=Car.live.filter(user=request.user), tag_queryset= Tag.objects.filter(name__icontains='text'))

vitalyvolkov pushed a commit to devua/django-tagging that referenced this pull request Jan 19, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant