Opened 16 years ago
Closed 15 years ago
#9604 closed (duplicate)
a patch to the docs regarding "how a complete example form could look like"
Reported by: | 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 |
Description
there is an example of a complete form in the section "RENDERING A CUSTOM COMMENT FOR" on this page: http://docs.djangoproject.com/en/dev/ref/contrib/comments/
it is not fully correct, because:
- the example results in a list of tr elements not surrounded by table element.
- 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"> <table> {{ form }} <tr id="action_buttons"> <th/> <td> <input type="submit" name="submit" class="preview-post" value="Preview"> <input type="submit" name="submit" class="submit-post" value="Post"> </td> </tr> </table> </form> </div>
and a few lines of the following stylesheet
<style type="text/css"> #myform label[for="id_honeypot"], #myform input#id_honeypot { display:none } #myform table th, #myform #action_buttons { text-align:right } </style>
will help to all newbies like I am.
regards,
Valer
Change History (3)
comment:1 by , 16 years ago
Has patch: | unset |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:3 by , 15 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Closing as duplicate in favor of #9819.
Note:
See TracTickets
for help on using tickets.
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.)