Last active
January 2, 2016 08:29
-
-
Save deguchi/8276552 to your computer and use it in GitHub Desktop.
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
テンプレートの継承 | |
{{ block.super }} | |
↓ | |
{{ super() }} | |
日付 | |
{{ recipe.date|date:"Y-m-d" }} | |
↓ | |
{{ recipe.date|datetimeformat('%Y-%m-%d') }} | |
def datetimeformat(value, format='%H:%M / %d-%m-%Y'): | |
return value.strftime(format) | |
繰り返し | |
{{forloop.counter}} | |
↓ | |
{{loop.index}} | |
エスケープ | |
{% autoescape off %} | |
↓ | |
{% autoescape false %} | |
{% endautoescape %} | |
or | |
{% value|safe %} | |
コメント | |
{% comment %} | |
{% endcomment %} | |
↓ | |
{# | |
#} | |
ifchanged | |
{% ifchanged lib.city %} | |
{% endifchanged %} | |
↓ | |
{% for lib in libraries %} | |
{% if before_libcity != lib.city %} | |
{% set before_libcity = lib.city %} | |
{% endfor %} | |
floatformat | |
{{city_okper_population|floatformat}}% | |
↓ | |
{{city_okper_population|round(1, 'floor')}}% | |
cycle | |
{% cycle 'recipe_left' 'recipe_right' %} | |
↓ | |
{{ loop.cycle('recipe_left', 'recipe_right') }} | |
Kindのキー | |
.key.id | |
↓ | |
.key.id() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment