Skip to content
This repository has been archived by the owner on Jan 7, 2021. It is now read-only.

Commit

Permalink
Prevented {% ifequal %} deprecation warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixxm authored and ObserverOfTime committed Dec 28, 2020
1 parent 1b916ec commit 6b3c8b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions commentary/templates/comments/form.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
{{ field }}
{% else %}
{% if field.errors %}{{ field.errors }}{% endif %}
<p {% if field.errors %} class="error"{% endif %}
{% ifequal field.name "honeypot" %} style="display:none;"{% endifequal %}>
<p{% if field.errors %} class="error"{% endif %}
{% if field.name == "honeypot" %} style="display:none;"{% endif %}>
{{ field.label_tag }} {{ field }}
</p>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion docs/example.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ creating a context variable. One can iterate over the ``form`` object to
get individual fields. This gives you fine-grain control over the form::

{% for field in form %}
{% ifequal field.name "comment" %}
{% if field.name == "comment" %}
<!-- Customize the "comment" field, say, make CSS changes -->
...
{% endfor %}
Expand Down

0 comments on commit 6b3c8b1

Please sign in to comment.