remove unnecessary imports
[mygpo.git] / mygpo / search / util.py
blobdd59209e034d7fcd2d68e5aa24177ef3f2f44f54
1 from mygpo.data.models import PodcastTag
3 def tag_string(tags, max_length=200):
4 """
5 returns a string of the most-assigned tags
7 tags is expected to be a PodcastTag QuerySet
8 """
9 tags = PodcastTag.objects.top_tags(tags)
10 return ','.join([t['tag'] for t in tags])[:max_length]