Django中自定义模板标签:template.Library()

创建py文件引入template包

from django import template
# 注册自定义标签,注册过系统才能认识,写法固定
register = template.Library()

猜你喜欢

转载自blog.csdn.net/qq_42221612/article/details/83547620