2012-08-16 23:41:25 -04:00
|
|
|
# Generic tags
|
|
|
|
|
|
|
|
snippet %
|
2013-11-16 14:45:48 -05:00
|
|
|
{% ${1} %}
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet %%
|
|
|
|
{% ${1:tag_name} %}
|
2013-11-16 14:45:48 -05:00
|
|
|
${0}
|
2012-08-16 23:41:25 -04:00
|
|
|
{% end$1 %}
|
|
|
|
snippet {
|
2013-11-16 14:45:48 -05:00
|
|
|
{{ ${1} }}
|
2012-08-16 23:41:25 -04:00
|
|
|
# Template Tags
|
|
|
|
|
|
|
|
snippet autoescape
|
|
|
|
{% autoescape ${1:off} %}
|
2013-11-16 14:45:48 -05:00
|
|
|
${0}
|
2012-08-16 23:41:25 -04:00
|
|
|
{% endautoescape %}
|
|
|
|
snippet block
|
|
|
|
{% block ${1} %}
|
2013-11-16 14:45:48 -05:00
|
|
|
${0}
|
2012-08-16 23:41:25 -04:00
|
|
|
{% endblock %}
|
|
|
|
snippet #
|
2013-11-16 14:45:48 -05:00
|
|
|
{# ${0:comment} #}
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet comment
|
|
|
|
{% comment %}
|
2013-11-16 14:45:48 -05:00
|
|
|
${0}
|
2012-08-16 23:41:25 -04:00
|
|
|
{% endcomment %}
|
|
|
|
snippet cycle
|
|
|
|
{% cycle ${1:val1} ${2:val2} ${3:as ${4}} %}
|
|
|
|
snippet debug
|
|
|
|
{% debug %}
|
|
|
|
snippet extends
|
2013-11-16 14:45:48 -05:00
|
|
|
{% extends "${0:base.html}" %}
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet filter
|
|
|
|
{% filter ${1} %}
|
2013-11-16 14:45:48 -05:00
|
|
|
${0}
|
2012-08-16 23:41:25 -04:00
|
|
|
{% endfilter %}
|
|
|
|
snippet firstof
|
|
|
|
{% firstof ${1} %}
|
|
|
|
snippet for
|
|
|
|
{% for ${1} in ${2} %}
|
2013-11-16 14:45:48 -05:00
|
|
|
${0}
|
2012-08-16 23:41:25 -04:00
|
|
|
{% endfor %}
|
|
|
|
snippet empty
|
|
|
|
{% empty %}
|
2013-11-16 14:45:48 -05:00
|
|
|
${0}
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet if
|
|
|
|
{% if ${1} %}
|
2013-11-16 14:45:48 -05:00
|
|
|
${0}
|
2012-08-16 23:41:25 -04:00
|
|
|
{% endif %}
|
2013-07-17 19:06:05 -04:00
|
|
|
snippet el
|
2012-08-16 23:41:25 -04:00
|
|
|
{% else %}
|
|
|
|
${1}
|
2013-07-17 19:06:05 -04:00
|
|
|
snippet eif
|
2013-04-13 13:45:21 -04:00
|
|
|
{% elif ${1} %}
|
2013-11-16 14:45:48 -05:00
|
|
|
${0}
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet ifchanged
|
|
|
|
{% ifchanged %}${1}{% endifchanged %}
|
|
|
|
snippet ifequal
|
|
|
|
{% ifequal ${1} ${2} %}
|
2013-11-16 14:45:48 -05:00
|
|
|
${0}
|
2012-08-16 23:41:25 -04:00
|
|
|
{% endifequal %}
|
|
|
|
snippet ifnotequal
|
|
|
|
{% ifnotequal ${1} ${2} %}
|
2013-11-16 14:45:48 -05:00
|
|
|
${0}
|
2012-08-16 23:41:25 -04:00
|
|
|
{% endifnotequal %}
|
|
|
|
snippet include
|
2013-11-16 14:45:48 -05:00
|
|
|
{% include "${0}" %}
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet load
|
2013-11-16 14:45:48 -05:00
|
|
|
{% load ${0} %}
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet now
|
2013-11-16 14:45:48 -05:00
|
|
|
{% now "${0:jS F Y H:i}" %}
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet regroup
|
2013-11-16 14:45:48 -05:00
|
|
|
{% regroup ${1} by ${2} as ${0} %}
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet spaceless
|
2013-11-16 14:45:48 -05:00
|
|
|
{% spaceless %}${0}{% endspaceless %}
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet ssi
|
2013-11-16 14:45:48 -05:00
|
|
|
{% ssi ${0} %}
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet trans
|
2013-11-16 14:45:48 -05:00
|
|
|
{% trans "${0:string}" %}
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet url
|
2013-11-16 14:45:48 -05:00
|
|
|
{% url ${1} as ${0} %}
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet widthratio
|
2013-11-16 14:45:48 -05:00
|
|
|
{% widthratio ${1:this_value} ${2:max_value} ${0:100} %}
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet with
|
|
|
|
{% with ${1} as ${2} %}
|
2013-11-16 14:45:48 -05:00
|
|
|
${0}
|
2013-04-13 13:45:21 -04:00
|
|
|
{% endwith %}
|
2012-08-16 23:41:25 -04:00
|
|
|
|
|
|
|
# Template Filters
|
|
|
|
|
|
|
|
# Note: Since SnipMate can't determine which template filter you are
|
|
|
|
# expanding without the "|" character, these do not add the "|"
|
|
|
|
# character. These save a few keystrokes still.
|
|
|
|
|
|
|
|
# Note: Template tags that take no arguments are not implemented.
|
|
|
|
|
|
|
|
snippet add
|
2013-11-16 14:45:48 -05:00
|
|
|
add:"${0}"
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet center
|
2013-11-16 14:45:48 -05:00
|
|
|
center:"${0}"
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet cut
|
2013-11-16 14:45:48 -05:00
|
|
|
cut:"${0}"
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet date
|
2013-11-16 14:45:48 -05:00
|
|
|
date:"${0}"
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet default
|
2013-11-16 14:45:48 -05:00
|
|
|
default:"${0}"
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet defaultifnone
|
2013-11-16 14:45:48 -05:00
|
|
|
default_if_none:"${0}"
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet dictsort
|
2013-11-16 14:45:48 -05:00
|
|
|
dictsort:"${0}"
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet dictsortrev
|
2013-11-16 14:45:48 -05:00
|
|
|
dictsortreversed:"${0}"
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet divisibleby
|
2013-11-16 14:45:48 -05:00
|
|
|
divisibleby:"${0}"
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet floatformat
|
2013-11-16 14:45:48 -05:00
|
|
|
floatformat:"${0}"
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet getdigit
|
2013-11-16 14:45:48 -05:00
|
|
|
get_digit:"${0}"
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet join
|
2013-11-16 14:45:48 -05:00
|
|
|
join:"${0}"
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet lengthis
|
2013-11-16 14:45:48 -05:00
|
|
|
length_is:"${0}"
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet pluralize
|
2013-11-16 14:45:48 -05:00
|
|
|
pluralize:"${0}"
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet removetags
|
2013-11-16 14:45:48 -05:00
|
|
|
removetags:"${0}"
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet slice
|
2013-11-16 14:45:48 -05:00
|
|
|
slice:"${0}"
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet stringformat
|
2013-11-16 14:45:48 -05:00
|
|
|
stringformat:"${0}"
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet time
|
2013-11-16 14:45:48 -05:00
|
|
|
time:"${0}"
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet truncatewords
|
2013-11-16 14:45:48 -05:00
|
|
|
truncatewords:${0}
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet truncatewordshtml
|
2013-11-16 14:45:48 -05:00
|
|
|
truncatewords_html:${0}
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet urlizetrunc
|
2013-11-16 14:45:48 -05:00
|
|
|
urlizetrunc:${0}
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet wordwrap
|
2013-11-16 14:45:48 -05:00
|
|
|
wordwrap:${0}
|
2012-08-16 23:41:25 -04:00
|
|
|
|