{% load comment %}

<form action="{% url comments.create_comment %}" method="post" class="comment">
  {% ifequal app "comment" %}
    <input type="hidden" name="back_url" value="{% back_url %}">
  {% else %}
    <input type="hidden" name="back_url" value="{% current_url %}">
  {% endifequal %}
  {% for field in form %}
    {% if field.is_hidden %}
      {{ field }}
    {% else %}
      {{ field.errors }}
      <p {% if field.errors %}class="error"{% endif %}>
         {{ field }}
      </p>
    {% endif %}
  {% endfor %}
  <p class="submit last">
    <input type="submit" name="post" class="submit-post" value="{% translate "Post" %}">
    {% ifequal app "comment" %}
      <a href="{% back_url %}">{% translate "Cancel" %}</a>
    {% endifequal %}
  </p>
</form>