How to put comments in Django templates

后端 未结 6 1226
清歌不尽
清歌不尽 2020-12-04 07:46

I would like to comment this with a line

{% if something.property %}
    ...



{% # this is a comment %}
{% if something.pr         
6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-04 08:35

    Using the {# #} notation, like so:

    {# Everything you see here is a comment. It won't show up in the HTML output. #}
    

提交回复
热议问题