Added:
/wiki/pp_comment_form.wiki
=======================================
--- /dev/null
+++ /wiki/pp_comment_form.wiki Wed Feb 9 05:07:12 2011
@@ -0,0 +1,39 @@
+#summary To load this tag include {% load commenttags %} at the top of the
html file.
+#sidebar TableOfContents
+
+= Custom Tag: `pp_comment_form` =
+====_Module: pirate_messges_====
+
+This template tag populates the namespace `pp_comment` with a form to
create a comment. This is only really used at the root level, comment
replies are handled by the dynamically generated HTML within commenttags.py
+
+==_Arguments and Parameters_==
+
+ * POST: `request.POST` contains modified form object if available
+ * reply_to: comment being replied to, shouldn't use this argument since
replies are handled dynamically
+ * user: user creating the comment, `request.user` most of the time
+ * edit: supply a comment to the form for editting
+
+==_Return value_==
+
+ * `pp_comment.form`: An HTML form containing the necessary fields for
creating a comment.
+
+==_Usage Notes_==
+ * *Assumptions*: This function assumes the user is authenticated.
+
+ * *Errors*: None
+
+==_Examples_==
+====Basic form====
+The following code will display the reputation integer.
+{{{
+{% pp_comment_form POST=request.POST path=request.path user=request.user
object=request.object%}
+ <div class="errors">{{ pp_comment.form.errors }}</div>
+ <form method="post" action="">
+ {{ pp_comment.form.text}}
+ {{ pp_comment.form.parent}}
+ {{pp_comment.form.form_id}}
+ {% csrf_token %}
+ <input type="submit" class='button green' value="Submit Comment">
+ </form>
+{% endpp_comment_form %}
+}}}