(parser, token)
return HasEditDashboardPermissionsNode(as_var=as_var)
Gets the workspaces queryset

    :syntax:

        {% has_edit_dashboard_permissions as [var_name] %}

    :example:

        {% has_edit_dashboard_permissions %}

        or

        {% has_edit_dashboard_permissions as has_permissions %}
Gets the workspaces queryset
Gets the workspaces queryset
def has_edit_dashboard_permissions(parser, token):
    """
    Gets the workspaces queryset

    :syntax:

        {% has_edit_dashboard_permissions as [var_name] %}

    :example:

        {% has_edit_dashboard_permissions %}

        or

        {% has_edit_dashboard_permissions as has_permissions %}
    """
    bits = token.contents.split()

    if len(bits) not in (1, 3):
        raise TemplateSyntaxError(
                "Invalid syntax for {0}. Incorrect number of "
                "arguments.".format(bits[0])
                )

    if 3 == len(bits):
        as_var = bits[-1]

    else:
        as_var = None

    return HasEditDashboardPermissionsNode(as_var=as_var)
def has_edit_dashboard_permissions ( parser , token ) : bits = token . contents . split ( ) if len ( bits ) not in ( 1 , 3 ) : raise TemplateSyntaxError ( "Invalid syntax for {0}. Incorrect number of " "arguments." . format ( bits [ 0 ] ) ) if 3 == len ( bits ) : as_var = bits [ - 1 ] else : as_var = None return HasEditDashboardPermissionsNode ( as_var = as_var )