Added:
/wiki/pp_consensus_get.wiki
=======================================
--- /dev/null
+++ /wiki/pp_consensus_get.wiki Wed Feb 9 01:39:05 2011
@@ -0,0 +1,55 @@
+#summary To load this tag include {% load consensustags %} at the top of
the html file.
+#sidebar TableOfContents
+
+= Custom Tag: `pp_conensus_get` =
+====_Module: pirate_consensus_====
+
+Consensus objects tie an object to all of the voting information for that
object. This tag populates the pp_consensus namespace with a consensus
object and related information, including the interest level of the object,
filenames for voting imgs based on the user.
+
+==_Arguments and Parameters_==
+
+ * object: the id of the object that the consensus is associated with the
object
+ * small: use the parameter "small" in this argument to specify the
smaller voting buttons
+
+==_Return value_==
+
+The primary return value is the consensus object and related fields. There
are also voting counts added to the context.
+
+ * `pp_consensus.consensus`: This is the consensus object itself.
+
+ * `pp_consensus.interest`: Holds the interest integer generated by the
ranking algorithm
+
+ * `pp_consensus.controversy`: Holds the controversy rating generated by
the controversy ranking algorithm
+
+ * `pp_consensus.upvotes`: Number of upvotes for this object
+
+ * `pp_consensus.neutvotes`: Number of neutvotes for this object
+
+ * `pp_consensus.downvotes`: Number of downvotes for this object
+
+ * `pp_consensus.upvoteimg`: References the file location of the upvote
image, so that image can be referenced by functions in the html
+
+ * `pp_consensus.downvoteimg`: References the file location of the
downvote image, so that image can be referenced by functions in the html
+
+ * `pp_consensus.neutvoteimg`: References the file location of the
neutralvote image, so that image can be referenced by functions in the html
+
+==_Usage Notes_==
+ * *Assumptions*: None
+
+ * *Potential Pitfalls*:
+ * To access this tag properly, the object must have generated a
consensus object on it's creation. Otherwise it will throw an Exception.
+
+ * *Errors*: None
+
+==_Examples_==
+====Basic form====
+The following code will display the information returned by this tag for
each issue. `{% include '_voting.html' %}` and `{%
include '_voting_iss_obj_small.html' %} require that pp_consensus is loaded.
+
+{{{
+ {% pp_consensus_get object=pp_solution.solution.id user=request.user %}
+ {{pp_consensus.interest}}
+ {% include '_voting.html' %}
+ {% endfor %}
+{% endpp_get_issue_list %}
+
+}}}