Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(0)  |  Derive(0)  |  Import(2)

        @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(
        'Invalid syntax for get_fragment: %s' % token.contents)
        


src/f/e/FeinCMS-1.9.3/feincms/templatetags/applicationcontent_tags.py   FeinCMS(Download)
from feincms.templatetags.feincms_tags import _render_content
# backwards compatibility import
from feincms.templatetags.fragment_tags import (
    fragment, get_fragment, has_fragment)
 

src/f/e/feincms-HEAD/feincms/templatetags/applicationcontent_tags.py   feincms(Download)
from feincms.templatetags.feincms_tags import _render_content
# backwards compatibility import
from feincms.templatetags.fragment_tags import (
    fragment, get_fragment, has_fragment)