在django template中定义临时变量,并自定义操做:赋值、自增

定义临时变量:前端 {% with i=1 %} {{i}} {% endwith %} 定义对临时变量操做的tag 在templatetags中建立set_val.pypython 内容是django from django import template import logging register = template.Library() class SetVarNode(templat
相关文章
相关标签/搜索