from django import template
register = template.Library()
from ..models import Post


@register.simple_tag
def total_posts():
    return Post.objects.all().count()


@register.inclusion_tag('posts/los_posts.html')
def show_posts(count=5):
    los_posts = Post.objects.all().order_by('-titulo')[:count]
    return {'posts': los_posts}

41956a2ebdc79b30ed5f3eb4f88cc6d5130e1c48
<mask token>


@register.inclusion_tag('posts/los_posts.html')
def show_posts(count=5):
    los_posts = Post.objects.all().order_by('-titulo')[:count]
    return {'posts': los_posts}

<mask token>


@register.simple_tag
def total_posts():
    return Post.objects.all().count()


@register.inclusion_tag('posts/los_posts.html')
def show_posts(count=5):
    los_posts = Post.objects.all().order_by('-titulo')[:count]
    return {'posts': los_posts}

<mask token>
register = template.Library()
<mask token>


@register.simple_tag
def total_posts():
    return Post.objects.all().count()


@register.inclusion_tag('posts/los_posts.html')
def show_posts(count=5):
    los_posts = Post.objects.all().order_by('-titulo')[:count]
    return {'posts': los_posts}

from django import template
register = template.Library()
from ..models import Post


@register.simple_tag
def total_posts():
    return Post.objects.all().count()


@register.inclusion_tag('posts/los_posts.html')
def show_posts(count=5):
    los_posts = Post.objects.all().order_by('-titulo')[:count]
    return {'posts': los_posts}
