Modified:
/wiki/pp_solution_form.wiki
=======================================
--- /wiki/pp_solution_form.wiki Tue Feb 8 20:19:19 2011
+++ /wiki/pp_solution_form.wiki Tue Feb 8 20:28:43 2011
@@ -32,7 +32,15 @@
This contains the HTML code for a form that can be used to create a new
issue. If this is used, none of the other fields need to be displayed since
this includes them all. Information about how this object can be slightly
formatted is
[http://docs.djangoproject.com/en/1.2/ref/forms/api/#outputting-forms-as-html
here].
* `pp_solution.solution_list`:
- This contains the HTML code for the input tag that should be filled the
name of the group.
+ This contains the HTML code for the input tag that should be filled the
name of the group. Each solution subsequently includes the following data
variables:
+
+ * issue = Parent issue
+ * name = Name of the solution
+ * text = Description of this solution
+ * submit_date = Date and time of the solution submission
+ * user = User who submitted this solution
+ * arguments = Number of arguments associated with this solution
+
==_Usage Notes_==
@@ -43,13 +51,13 @@
==_Examples_==
====Basic form====
The following code will create an html form and will save the data when it
is posted. That data would then be viewable by pp_permgroup_list.
+Each issue object needs to be referenced as `iss_obj` to take advantage of
the `{% include '_solution.html' %}`. This html file references 'iss_obj'.
{{{
{% pp_get_solution_list issue=request.object dimension=request.dimension %}
{%for iss_obj in pp_solution.solution_list%}
{% include '_solution.html' %}
{% empty %}
No solutions yet! Add a solution.
-
{% endfor %}
}}}