[pirate-politics] r603 committed - Created wiki page through web user interface.

5 views
Skip to first unread message

pirate-...@googlecode.com

unread,
Feb 9, 2011, 8:31:21 AM2/9/11
to pirate-poli...@googlegroups.com
Revision: 603
Author: fragro
Date: Wed Feb 9 05:01:19 2011
Log: Created wiki page through web user interface.
http://code.google.com/p/pirate-politics/source/detail?r=603

Added:
/wiki/pp_comment_list_get.wiki

=======================================
--- /dev/null
+++ /wiki/pp_comment_list_get.wiki Wed Feb 9 05:01:19 2011
@@ -0,0 +1,34 @@
+#summary To load this tag include {% load commenttags %} at the top of the
html file.
+#sidebar TableOfContents
+
+= Custom Tag: `pp_comment_list_get` =
+====_Module: pirate_messges_====
+
+This template tag populates the namespace `pp_comment` with a integer
count value.
+
+==_Arguments and Parameters_==
+
+ * object: The id of the object we want to get the comment tree for.
+ * user: Authenticated user, for reply links
+ * request: WSGI request object is used to dynamically generate the CSRF
token and other tasks
+
+==_Return value_==
+
+ * `pp_comment.comments`: HTML comment tree, further explained in Usage
Notes
+
+==_Usage Notes_==
+ * *Assumptions*: To get over the lack of recursion within a template, and
still maintain the modularity we desire, the comment HTML is dynamically
generated within the commenttags.py file under the functions
`render_to_comment_tree_html` and `render_comment`. To alter the actual
HTML of an atomic comment it must be done through the `render_comment`
function, or through CSS which accesses the comment divs. As a result, to
render the HTML, a `safe` filter must be applied to `pp_comment.comments`.
+
+ * *Errors*: None
+
+==_Examples_==
+====Basic form====
+The following code will display the reputation integer.
+{{{
+{% pp_comment_list_get user=request.user object=pp_issue.issue.id
request=request %}
+
+ {% comment %} {{ pp_comment.debug_comments }} {% endcomment %}
+ {{ pp_comment.comments|safe }}
+
+{% endpp_comment_list_get%}
+}}}

Reply all
Reply to author
Forward
0 new messages