2011-06-20 13:40:28 -04:00
|
|
|
# Generic tags
|
|
|
|
|
2015-11-07 07:30:52 -05:00
|
|
|
extends html
|
|
|
|
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet %
|
2013-07-25 17:17:32 -04:00
|
|
|
{% ${1} %}
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet %%
|
|
|
|
{% ${1:tag_name} %}
|
2013-07-25 17:17:32 -04:00
|
|
|
${0}
|
2011-06-20 13:40:28 -04:00
|
|
|
{% end$1 %}
|
|
|
|
snippet {
|
2013-07-25 17:17:32 -04:00
|
|
|
{{ ${1} }}
|
2011-06-20 13:40:28 -04:00
|
|
|
# Template Tags
|
|
|
|
|
|
|
|
snippet autoescape
|
|
|
|
{% autoescape ${1:off} %}
|
2013-07-25 17:17:32 -04:00
|
|
|
${0}
|
2011-06-20 13:40:28 -04:00
|
|
|
{% endautoescape %}
|
|
|
|
snippet block
|
|
|
|
{% block ${1} %}
|
2013-07-25 17:17:32 -04:00
|
|
|
${0}
|
2011-06-20 13:40:28 -04:00
|
|
|
{% endblock %}
|
|
|
|
snippet #
|
2013-07-25 17:17:32 -04:00
|
|
|
{# ${0:comment} #}
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet comment
|
|
|
|
{% comment %}
|
2013-07-25 17:17:32 -04:00
|
|
|
${0}
|
2011-06-20 13:40:28 -04:00
|
|
|
{% endcomment %}
|
|
|
|
snippet cycle
|
|
|
|
{% cycle ${1:val1} ${2:val2} ${3:as ${4}} %}
|
|
|
|
snippet debug
|
|
|
|
{% debug %}
|
|
|
|
snippet extends
|
2013-07-25 17:17:32 -04:00
|
|
|
{% extends "${0:base.html}" %}
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet filter
|
|
|
|
{% filter ${1} %}
|
2013-07-25 17:17:32 -04:00
|
|
|
${0}
|
2011-06-20 13:40:28 -04:00
|
|
|
{% endfilter %}
|
|
|
|
snippet firstof
|
|
|
|
{% firstof ${1} %}
|
|
|
|
snippet for
|
|
|
|
{% for ${1} in ${2} %}
|
2013-07-25 17:17:32 -04:00
|
|
|
${0}
|
2011-06-20 13:40:28 -04:00
|
|
|
{% endfor %}
|
|
|
|
snippet empty
|
|
|
|
{% empty %}
|
2013-07-25 17:17:32 -04:00
|
|
|
${0}
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet if
|
|
|
|
{% if ${1} %}
|
2013-07-25 17:17:32 -04:00
|
|
|
${0}
|
2011-06-20 13:40:28 -04:00
|
|
|
{% endif %}
|
2013-06-22 20:30:26 -04:00
|
|
|
snippet el
|
2011-06-20 13:40:28 -04:00
|
|
|
{% else %}
|
2012-06-06 08:22:44 -04:00
|
|
|
${1}
|
2013-06-22 20:30:26 -04:00
|
|
|
snippet eif
|
2013-01-27 14:55:13 -05:00
|
|
|
{% elif ${1} %}
|
2013-07-25 17:17:32 -04:00
|
|
|
${0}
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet ifchanged
|
|
|
|
{% ifchanged %}${1}{% endifchanged %}
|
|
|
|
snippet ifequal
|
|
|
|
{% ifequal ${1} ${2} %}
|
2013-07-25 17:17:32 -04:00
|
|
|
${0}
|
2011-06-20 13:40:28 -04:00
|
|
|
{% endifequal %}
|
|
|
|
snippet ifnotequal
|
|
|
|
{% ifnotequal ${1} ${2} %}
|
2013-07-25 17:17:32 -04:00
|
|
|
${0}
|
2011-06-20 13:40:28 -04:00
|
|
|
{% endifnotequal %}
|
|
|
|
snippet include
|
2013-07-25 17:17:32 -04:00
|
|
|
{% include "${0}" %}
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet load
|
2013-07-25 17:17:32 -04:00
|
|
|
{% load ${0} %}
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet now
|
2013-07-25 17:17:32 -04:00
|
|
|
{% now "${0:jS F Y H:i}" %}
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet regroup
|
2013-07-25 17:17:32 -04:00
|
|
|
{% regroup ${1} by ${2} as ${0} %}
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet spaceless
|
2013-07-25 17:17:32 -04:00
|
|
|
{% spaceless %}${0}{% endspaceless %}
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet ssi
|
2013-07-25 17:17:32 -04:00
|
|
|
{% ssi ${0} %}
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet trans
|
2013-07-25 17:17:32 -04:00
|
|
|
{% trans "${0:string}" %}
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet url
|
2013-07-25 17:17:32 -04:00
|
|
|
{% url ${1} as ${0} %}
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet widthratio
|
2013-07-25 17:17:32 -04:00
|
|
|
{% widthratio ${1:this_value} ${2:max_value} ${0:100} %}
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet with
|
|
|
|
{% with ${1} as ${2} %}
|
2013-07-25 17:17:32 -04:00
|
|
|
${0}
|
2013-02-05 15:57:41 -05:00
|
|
|
{% endwith %}
|
2011-06-20 13:40:28 -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-07-25 17:17:32 -04:00
|
|
|
add:"${0}"
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet center
|
2013-07-25 17:17:32 -04:00
|
|
|
center:"${0}"
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet cut
|
2013-07-25 17:17:32 -04:00
|
|
|
cut:"${0}"
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet date
|
2013-07-25 17:17:32 -04:00
|
|
|
date:"${0}"
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet default
|
2013-07-25 17:17:32 -04:00
|
|
|
default:"${0}"
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet defaultifnone
|
2013-07-25 17:17:32 -04:00
|
|
|
default_if_none:"${0}"
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet dictsort
|
2013-07-25 17:17:32 -04:00
|
|
|
dictsort:"${0}"
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet dictsortrev
|
2013-07-25 17:17:32 -04:00
|
|
|
dictsortreversed:"${0}"
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet divisibleby
|
2013-07-25 17:17:32 -04:00
|
|
|
divisibleby:"${0}"
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet floatformat
|
2013-07-25 17:17:32 -04:00
|
|
|
floatformat:"${0}"
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet getdigit
|
2013-07-25 17:17:32 -04:00
|
|
|
get_digit:"${0}"
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet join
|
2013-07-25 17:17:32 -04:00
|
|
|
join:"${0}"
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet lengthis
|
2013-07-25 17:17:32 -04:00
|
|
|
length_is:"${0}"
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet pluralize
|
2013-07-25 17:17:32 -04:00
|
|
|
pluralize:"${0}"
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet removetags
|
2013-07-25 17:17:32 -04:00
|
|
|
removetags:"${0}"
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet slice
|
2013-07-25 17:17:32 -04:00
|
|
|
slice:"${0}"
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet stringformat
|
2013-07-25 17:17:32 -04:00
|
|
|
stringformat:"${0}"
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet time
|
2013-07-25 17:17:32 -04:00
|
|
|
time:"${0}"
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet truncatewords
|
2013-07-25 17:17:32 -04:00
|
|
|
truncatewords:${0}
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet truncatewordshtml
|
2013-07-25 17:17:32 -04:00
|
|
|
truncatewords_html:${0}
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet urlizetrunc
|
2013-07-25 17:17:32 -04:00
|
|
|
urlizetrunc:${0}
|
2011-06-20 13:40:28 -04:00
|
|
|
snippet wordwrap
|
2013-07-25 17:17:32 -04:00
|
|
|
wordwrap:${0}
|