Ejemplo n.º 1
0
def tags_list(context):
    posts = post_list(context)
    tmap = dataaccess.tag_map()
    tags = defaultdict(lambda: 0)
    for p in posts:
        for t in tmap.get(p.id, []):
            tags[t.name] += 1
    return sorted(tags.items())
Ejemplo n.º 2
0
def post_tags(post):
    tmap = dataaccess.tag_map()
    return tmap[post.id]