Django comment 标签
注释
注释让您可以拥有应该忽略的代码部分。
实例
<h2>Welcome Everyone</h2>{% comment %}<h2>Welcome ladies and gentlemen</h2>{% endcomment %}
结果
Welcome everyone
您还可以在注释中添加一些消息,用于描述注释。
实例
<h2>Welcome Everyone</h2>{% comment "this was the original welcome message" %}<h2>Welcome ladies and gentlemen</h2>{% endcomment %}