@register.tag(name="get_category_stories")
def get_category_stories(parser, token):
    bits = token.split_contents()
    if 5 != len(bits):
        raise TemplateSyntaxError('%r expects 5 arguments' % bits[0])
    if bits[-2] != 'as':
        raise TemplateSyntaxError(
            '%r expects "as" as the third argument' % bits[0])
    category = bits[1]
    limit = bits[2]
    varname = bits[-1]
    return get_category_stories_node(category, limit, varname)
dataset/ETHPy150Open zorna/zorna/zorna/articles/templatetags/articles_tags.py/get_category_stories/original