Ejemplo n.º 1
0
def get_blog_entries_by_tag(builder, tag):
    posts = get_all_entries(builder)
    return [
        post
        for post
        in posts
        if tag in post.tags
    ]
Ejemplo n.º 2
0
def get_blog_entries_by_bird(builder, bird):
    posts = get_all_entries(builder)
    return [
        post
        for post
        in posts
        if bird == post.author
    ]
Ejemplo n.º 3
0
def get_blog_entries_by_tag(builder, tag):
    posts = get_all_entries(builder)
    return [post for post in posts if tag in post.tags]
Ejemplo n.º 4
0
def get_blog_entries_by_bird(builder, bird):
    posts = get_all_entries(builder)
    return [post for post in posts if bird == post.author]
Ejemplo n.º 5
0
def get_some_recent_blog_entries(builder, count=10):
    return get_all_entries(builder)[:count]