django折叠空白的简单模板标记
django-collapse-whitespace-templatetag的Python项目详细描述
django的一个简单的空白折叠模板标记-用于格式化 纯文本电子邮件,或当空格真正重要时。
安装
- Install to PYTHONPATH, etc.
然后要么:
Add ^{tt1}$ to ^{tt2}$ and then use:
{% load collapse_whitespace_templatetag %}… in your templates.
或:
- Add ^{tt3}$ to your ^{tt4}$ entry in ^{tt5}$ (Django 1.9)
或:
Add to builtins (< Django 1.9) with in some ^{tt6}$:
from django.template.base import add_to_builtins add_to_builtins('collapse_whitespace_templatetag.templatetags.collapse_whitespace'