tags:

views:

512

answers:

3

I would like to comment this with a line

{% if something.property %}
    <table>
        <tr>...



{% # this is a comment %}
{% if something.property %}
    <table>
        <tr>...
+5  A: 

http://www.google.com/search?q=django+template+comment

First result: http://docs.djangoproject.com/en/dev/ref/templates/builtins/

{% comment %} this is a comment {% endcomment %}


Van Gale and mipadi's answers can be found in the second result: http://docs.djangoproject.com/en/dev/topics/templates/

Miles
+6  A: 

As answer by Miles, {% comment %}...{% endcomment %} is used for multi-line comments, but you can also comment out text on the same line like this:

{# some text #}
Van Gale
+3  A: 

Using the {# #} notation, like so:

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