django-custom-tags

    -5热度

    1回答

    请用django自定义标签帮助。请分析它! 理念: 在任何模板(父母或子女),我们安装一个标记{{无绳“头”}},有一个名字,比如推杆可能不止一个。 在另一边,我们有阻止此块 {{ teleputter "head" "unique-name" }} some html {{ teleputterend }} 内容去与适当的无绳名无绳。

    0热度

    2回答

    我想在django中编写自定义inclusion_tag。 继http://docs.djangoproject.com/en/dev/howto/custom-template-tags/ 的例子,我只是写 @register.inclusion_tag('test.html') 这里的test.html在同一目录(应用程序/程序my_app/templatetags)的文件作为其定义.py