summaryrefslogtreecommitdiff
path: root/taskapp/forms
diff options
context:
space:
mode:
authornishanth2010-02-04 23:15:37 +0530
committernishanth2010-02-04 23:15:37 +0530
commit9f940aa6a9e67241d1c680b35b8f280f7210c514 (patch)
treed9e9e6db6529817e7c1e68cfb94df839867fe723 /taskapp/forms
parent54f307faa17ac411336c261a7acc57edb6df7d1a (diff)
downloadpytask-9f940aa6a9e67241d1c680b35b8f280f7210c514.tar.gz
pytask-9f940aa6a9e67241d1c680b35b8f280f7210c514.tar.bz2
pytask-9f940aa6a9e67241d1c680b35b8f280f7210c514.zip
added the functionality to assign a task to one of the claimed users.
Diffstat (limited to 'taskapp/forms')
-rw-r--r--taskapp/forms/task.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/taskapp/forms/task.py b/taskapp/forms/task.py
index b4303e3..953f615 100644
--- a/taskapp/forms/task.py
+++ b/taskapp/forms/task.py
@@ -19,3 +19,11 @@ class ClaimTaskForm(forms.ModelForm):
class Meta:
model = Claim
fields = ['message']
+
+def AssignTaskForm(choices, instance=None):
+ """ return a form object with appropriate choices """
+
+ class myform(forms.Form):
+ user = forms.ChoiceField(choices=choices, required=True)
+ form = myform()
+ return form