Ejemplo n.º 1
0
def do_placeholder(parser, token):
    """
    Method that parse the placeholder template tag.

    Syntax::

        {% placeholder <name> [on <page>] [with <widget>] \
[parsed] [as <varname>] %}

    Example usage::

        {% placeholder about %}
        {% placeholder body with TextArea as body_text %}
        {% placeholder welcome with TextArea parsed as welcome_text %}
        {% placeholder teaser on next_page with TextArea parsed %}
    """
    name, params = parse_placeholder(parser, token)
    return PlaceholderNode(name, **params)
Ejemplo n.º 2
0
def do_placeholder(parser, token):
    """
    Method that parse the placeholder template tag.

    Syntax::

        {% placeholder <name> [on <page>] [with <widget>] \
[parsed] [as <varname>] %}

    Example usage::

        {% placeholder about %}
        {% placeholder body with TextArea as body_text %}
        {% placeholder welcome with TextArea parsed as welcome_text %}
        {% placeholder teaser on next_page with TextArea parsed %}
    """
    name, params = parse_placeholder(parser, token)
    return PlaceholderNode(name, **params)
Ejemplo n.º 3
0
def do_contactplaceholder(parser, token):
    """
    Method that parse the contactplaceholder template tag.
    """
    name, params = parse_placeholder(parser, token)
    return ContactPlaceholderNode(name, **params)
Ejemplo n.º 4
0
def do_videoplaceholder(parser, token):
    """
    Method that parse the imageplaceholder template tag.
    """
    name, params = parse_placeholder(parser, token)
    return VideoPlaceholderNode(name, **params)
Ejemplo n.º 5
0
def do_fileplaceholder(parser, token):
    """
    Method that parse the fileplaceholder template tag.
    """
    name, params = parse_placeholder(parser, token)
    return FilePlaceholderNode(name, **params)
Ejemplo n.º 6
0
def do_contactplaceholder(parser, token):
    """
    Method that parse the contactplaceholder template tag.
    """
    name, params = parse_placeholder(parser, token)
    return ContactPlaceholderNode(name, **params)
Ejemplo n.º 7
0
def do_videoplaceholder(parser, token):
    """
    Method that parse the imageplaceholder template tag.
    """
    name, params = parse_placeholder(parser, token)
    return VideoPlaceholderNode(name, **params)
Ejemplo n.º 8
0
def do_fileplaceholder(parser, token):
    """
    Method that parse the fileplaceholder template tag.
    """
    name, params = parse_placeholder(parser, token)
    return FilePlaceholderNode(name, **params)