@register.tag
def get_fragment(parser, token):
    """
    Fetches the content of a fragment.

    Either::

        {% get_fragment request "title" %}

    or::

        {% get_fragment request "title" as title %}
    """

    fragments = token.contents.split()

    if len(fragments) == 3:
        return GetFragmentNode(fragments[1], fragments[2])
    elif len(fragments) == 5 and fragments[3] == 'as':
        return GetFragmentNode(fragments[1], fragments[2], fragments[4])
    raise template.TemplateSyntaxError(
        token.contents % 'Invalid syntax for get_fragment: %s')
dataset/ETHPy150Open feincms/feincms/feincms/templatetags/fragment_tags.py/get_fragment/swapped operands of `%`