1 from mygpo
.data
.models
import PodcastTag
3 def tag_string(tags
, max_length
=200):
5 returns a string of the most-assigned tags
7 tags is expected to be a PodcastTag QuerySet
9 tags
= PodcastTag
.objects
.top_tags(tags
)
10 return ','.join([t
['tag'] for t
in tags
])[:max_length
]