from ..models import Post

register = template.Library()


@register.simple_tag(name='total_posts')
def total_posts():
    return Post.published.count()


@register.inclusion_tag('blog/partials/latest_posts.html')
def show_latest_posts(count=3):