[英]Django template filters, tags, simple_tags, and inclusion_tags
[英]Using conditions with django template tags/filters?
如果我在我的模板中使用{% spaceless %}<html></html>{% endspaceless %}
,但我只希望在我不調試時才使用 spaceless function,怎么做? 我嘗試使用{% if %}{% spaceless %}{% endif %}
,但這是一個錯誤。
謝謝!
我只寫了這樣一個標簽並將其放在 Django 片段: http://djangosnippets.org/snippets/2405/享受!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.