Hey guys, when I include the django comments form in the template I
want to use it, After visting the page, I can only see "POST" and
"PREVIEW" button and the form itself is not showing. So I clicked on
the 'POST" button to see what's next.

After clicking it, I get this:

Comment post not allowed (400)
Why:    Missing content_type or object_pk field.

The comment you tried to post to this view wasn't saved because
something tampered with the security information in the comment form.
The message above should explain the problem, or you can check the
comment documentation for more help.

You're seeing this error because you have DEBUG = True in your Django
settings file. Change that to False, and Django will display a
standard 400 error page.

Django Documents aint helping in this case. Please What I'm I missing?
below is the codes in my form.html

{% load comments i18n %}
<form action="{% comment_form_target %}" method="post">{% csrf_token
%}
  {% if next %}<div><input type="hidden" name="next"
value="{{ next }}" /></div>{% endif %}
  {% for field in form %}
    {% if field.is_hidden %}
      <div>{{ field }}</div>
    {% else %}
      {% if field.errors %}{{ field.errors }}{% endif %}
      <p
        {% if field.errors %} class="error"{% endif %}
        {% ifequal field.name "honeypot" %} style="display:none;"{%
endifequal %}>
        {{ field.label_tag }} {{ field }}
      </p>
    {% endif %}
  {% endfor %}
  <p class="submit">
    <input type="submit" name="post" class="submit-post" value="{%
trans "Post" %}" />
    {# <input type="submit" name="preview" class="submit-preview"
value="{% trans "Preview" %}" /> #}
  </p>
</form>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to