taskapp/forms/task.py
changeset 93 1a1e712e60fd
parent 92 c99f09bebe56
child 94 d1f59bbc2685
--- a/taskapp/forms/task.py	Thu Feb 25 04:38:50 2010 +0530
+++ b/taskapp/forms/task.py	Thu Feb 25 06:07:55 2010 +0530
@@ -41,3 +41,10 @@
 
         task = forms.ChoiceField(choices=task_choices)
     return myForm()
+
+def AssignCreditForm(choices, instance=None):
+    
+    class myForm(forms.Form):
+        user = forms.ChoiceField(choices=choices, required=True)
+        points = forms.IntegerField(min_value=0,required=True)
+    return myForm(instance) if instance else myForm()