Skip to content

Commit 33143ff

Browse files
committed
Prevented {% ifequal %} deprecation warning.
1 parent 13e522c commit 33143ff

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

django_comments/templates/comments/form.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
{% if field.errors %}{{ field.errors }}{% endif %}
1010
<p
1111
{% if field.errors %} class="error"{% endif %}
12-
{% ifequal field.name "honeypot" %} style="display:none;"{% endifequal %}>
12+
{% if field.name == "honeypot" %} style="display:none;"{% endif %}>
1313
{{ field.label_tag }} {{ field }}
1414
</p>
1515
{% endif %}

django_comments/templates/comments/preview.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ <h1>{% trans "Preview your comment" %}</h1>
2727
{% if field.errors %}{{ field.errors }}{% endif %}
2828
<p
2929
{% if field.errors %} class="error"{% endif %}
30-
{% ifequal field.name "honeypot" %} style="display:none;"{% endifequal %}>
30+
{% if field.name == "honeypot" %} style="display:none;"{% endif %}>
3131
{{ field.label_tag }} {{ field }}
3232
</p>
3333
{% endif %}

docs/example.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ creating a context variable. One can iterate over the ``form`` object to
8989
get individual fields. This gives you fine-grain control over the form::
9090

9191
{% for field in form %}
92-
{% ifequal field.name "comment" %}
92+
{% if field.name == "comment" %}
9393
<!-- Customize the "comment" field, say, make CSS changes -->
9494
...
9595
{% endfor %}

0 commit comments

Comments
 (0)