(parser, token)
return GetDashPluginNode(dashboard_entry=dashboard_entry, as_var=as_var)
Get the plugin.

    Note, that ``dashboard_entry`` shall be a instance of
    ``dash.models.DashboardEntry``.

    :syntax:

        {% get_dash_plugin dashboard_entry as [context_var_name] %}

    :example:

        {% get_dash_plugin dashboard_entry as plugin %}

        {% get_dash_plugin dashboard_entry as plugin %}
        {{ plugin.render }}
Get the plugin.
Get the plugin .
def get_dash_plugin(parser, token):
    """Get the plugin.

    Note, that ``dashboard_entry`` shall be a instance of
    ``dash.models.DashboardEntry``.

    :syntax:

        {% get_dash_plugin dashboard_entry as [context_var_name] %}

    :example:

        {% get_dash_plugin dashboard_entry as plugin %}

        {% get_dash_plugin dashboard_entry as plugin %}
        {{ plugin.render }}
    """
    bits = token.contents.split()

    if 4 == len(bits):
        if 'as' != bits[-2]:
            raise TemplateSyntaxError(
                "Invalid syntax for {0}. Incorrect number of "
                "arguments.".format(bits[0])
            )
        as_var = bits[-1]
    else:
        raise TemplateSyntaxError(
            "Invalid syntax for {0}. See docs for valid syntax."
            "".format(bits[0])
        )

    dashboard_entry = parser.compile_filter(bits[1])

    return GetDashPluginNode(dashboard_entry=dashboard_entry, as_var=as_var)
def get_dash_plugin ( parser , token ) : bits = token . contents . split ( ) if 4 == len ( bits ) : if 'as' != bits [ - 2 ] : raise TemplateSyntaxError ( "Invalid syntax for {0}. Incorrect number of " "arguments." . format ( bits [ 0 ] ) ) as_var = bits [ - 1 ] else : raise TemplateSyntaxError ( "Invalid syntax for {0}. See docs for valid syntax." "" . format ( bits [ 0 ] ) ) dashboard_entry = parser . compile_filter ( bits [ 1 ] ) return GetDashPluginNode ( dashboard_entry = dashboard_entry , as_var = as_var )