Excerpts from Michael P. Soulier's message of 2012-02-12 14:16:26 -0200: > On 12/02/12 coded kid said: > > > Below is the codes in my comments/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 have conditionals on all output. If you're seeing a blank page, perhaps > those conditionals are all false. Put in some unconditional content and see if > it renders, and then start testing your conditionals.
"/comments/post" is decorated by require_POST, that means that POST is the only method allowed to access that view, check your response, you should be getting a 405 response. You should include the form in the page you want it to display, let's say a blog post page, but if you want the form on a single page, then you need to define a different URL and view to render the template. Regards, Matías -- Matías Aguirre (matiasagui...@gmail.com) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.