Created
April 8, 2015 00:37
-
-
Save Deathnerd/c264b2aeba787e01c07c to your computer and use it in GitHub Desktop.
Jinja Pycharm Live Templates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<templateSet group="jinja"> | |
<template name="jinelse" value="{% else %} $END$" description="A simple else line" toReformat="true" toShortenFQNames="true"> | |
<context> | |
<option name="HTML_TEXT" value="true" /> | |
<option name="HTML" value="true" /> | |
<option name="Django" value="true" /> | |
</context> | |
</template> | |
<template name="jinblock" value="{% block $BLOCKNAME$ %} $END$ {% endblock %} " description="A generic jinja block" toReformat="true" toShortenFQNames="true"> | |
<variable name="BLOCKNAME" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="HTML_TEXT" value="true" /> | |
<option name="HTML" value="true" /> | |
<option name="Django" value="true" /> | |
</context> | |
</template> | |
<template name="jinext" value="{% extends "$SOMETHING$" %}" description="An extend tag" toReformat="true" toShortenFQNames="true"> | |
<variable name="SOMETHING" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="HTML_TEXT" value="true" /> | |
<option name="HTML" value="true" /> | |
<option name="Django" value="true" /> | |
</context> | |
</template> | |
<template name="jinforin" value="{% for $NEEDLE$ in $HAYSTACK$ %} $END$ {% endfor %}" description="A for in block" toReformat="true" toShortenFQNames="true"> | |
<variable name="NEEDLE" expression="" defaultValue="" alwaysStopAt="true" /> | |
<variable name="HAYSTACK" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="HTML_TEXT" value="true" /> | |
<option name="HTML" value="true" /> | |
<option name="Django" value="true" /> | |
</context> | |
</template> | |
<template name="jinif" value="{% if $CONDITION$ %} $END$ {% endif %}" description="A simple if" toReformat="true" toShortenFQNames="true"> | |
<variable name="CONDITION" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="HTML_TEXT" value="true" /> | |
<option name="HTML" value="true" /> | |
<option name="Django" value="true" /> | |
</context> | |
</template> | |
<template name="jinimp" value="(% import "$IMPORT$" %}" description="A simple import" toReformat="true" toShortenFQNames="true"> | |
<variable name="IMPORT" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="HTML_TEXT" value="true" /> | |
<option name="HTML" value="true" /> | |
<option name="Django" value="true" /> | |
</context> | |
</template> | |
<template name="jinimpas" value="{% import "$IMPORT$" as $ALIAS$ %}" description="A simple import as line" toReformat="true" toShortenFQNames="true"> | |
<variable name="IMPORT" expression="" defaultValue="" alwaysStopAt="true" /> | |
<variable name="ALIAS" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="HTML_TEXT" value="true" /> | |
<option name="HTML" value="true" /> | |
<option name="Django" value="true" /> | |
</context> | |
</template> | |
<template name="jinifelse" value="{% if $CONDITION$ %} $STUFF$ {% else %} $OTHER_STUFF$ {% endif %} $END$ " description="A simple if/else" toReformat="true" toShortenFQNames="true"> | |
<variable name="CONDITION" expression="" defaultValue="" alwaysStopAt="true" /> | |
<variable name="STUFF" expression="" defaultValue="" alwaysStopAt="true" /> | |
<variable name="OTHER_STUFF" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="HTML_TEXT" value="true" /> | |
<option name="HTML" value="true" /> | |
<option name="Python" value="false" /> | |
<option name="Django" value="true" /> | |
</context> | |
</template> | |
<template name="jinwith" value="{% with $VAR$ %} $END$ {% endwith %}" description="A jinja with statement" toReformat="false" toShortenFQNames="true"> | |
<variable name="VAR" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="HTML_TEXT" value="true" /> | |
<option name="HTML" value="true" /> | |
<option name="Python" value="true" /> | |
</context> | |
</template> | |
<template name="jininc" value="{% include $INCLUDE$ %} $END$" description="A simple include" toReformat="true" toShortenFQNames="true"> | |
<variable name="INCLUDE" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="HTML_TEXT" value="true" /> | |
<option name="HTML" value="true" /> | |
<option name="Python" value="true" /> | |
</context> | |
</template> | |
<template name="urlforstatic" value="{{ url_for('static', filename='$FILENAME$') }}" description="A url_for function for static files" toReformat="false" toShortenFQNames="true"> | |
<variable name="FILENAME" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="HTML_TEXT" value="true" /> | |
<option name="HTML" value="true" /> | |
<option name="XSL_TEXT" value="true" /> | |
<option name="XML" value="true" /> | |
<option name="XML_TEXT" value="true" /> | |
</context> | |
</template> | |
</templateSet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment