Opened 14 years ago

Closed 13 years ago

#9604 closed (duplicate)

a patch to the docs regarding "how a complete example form could look like"

Reported by: vak <khamenya@…> Owned by: nobody
Component: contrib.comments Version: dev
Severity: Keywords: doc patch
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


there is an example of a complete form in the section "RENDERING A CUSTOM COMMENT FOR" on this page:

it is not fully correct, because:

  1. the example results in a list of tr elements not surrounded by table element.
  2. the button below the form is a mess between "preview" and "post".

the example might be like:

<h2>Post a comment</h2>
{% get_comment_form for blog.entry 1 as form %}
<div id="myform">
    <form action="{% comment_form_target %}" method="POST">
        {{ form }}
        <tr id="action_buttons">
            <input type="submit" name="submit" class="preview-post" value="Preview">
            <input type="submit" name="submit" class="submit-post" value="Post">

and a few lines of the following stylesheet

<style type="text/css">
#myform label[for="id_honeypot"], #myform input#id_honeypot {

#myform table th, #myform #action_buttons {

will help to all newbies like I am.


Change History (3)

comment:1 Changed 14 years ago by Malcolm Tredinnick

Has patch: unset
Triage Stage: UnreviewedAccepted

If somebody wants to make a patch for something like this, it would be a start.

Note, however, that there's no need to include CSS in the example. There's nothing Django-specific about that and, in the above example, it's all up to whomever writes the template. However, the documentation for comments could mention any specific CSS classes that the template tags create (if there are any).

Also, the example template fragment isn't correct, since there shouldn't be two controls for separate purposes with the same "name" attribute (it's broken for internationalisation purposes). The template fragments in the comments application show the correct approach.

(I don't know why "has patch" has been checked here, since there's no patch attached.)

comment:2 Changed 13 years ago by Thejaswi Puthraya

Subset of #9819 that has a patch (w/o the CSS).

comment:3 Changed 13 years ago by Jannis Leidel

Resolution: duplicate
Status: newclosed

Closing as duplicate in favor of #9819.

Note: See TracTickets for help on using tickets.
Back to Top