これを一行でコメントしたい
{% if something.property %}
<table>
<tr>...
{% # this is a comment %}
{% if something.property %}
<table>
<tr>...
これを一行でコメントしたい
{% if something.property %}
<table>
<tr>...
{% # this is a comment %}
{% if something.property %}
<table>
<tr>...
Milesの回答として{% comment %}...{% endcomment %}
、複数行のコメントに使用されますが、次のように同じ行のテキストをコメントアウトすることもできます:
{# some text #}
コメント タグは、https://docs.djangoproject.com/en/stable/ref/templates/builtins/#std:templatetag-commentに記載されています。
{% comment %} this is a comment {% endcomment %}
1 行のコメントは、https://docs.djangoproject.com/en/stable/topics/templates/#commentsに記載されています。
{# this won't be rendered #}
表記を使用する{# #}
と、次のようになります。
{# Everything you see here is a comment. It won't show up in the HTML output. #}