taskapp/forms/task.py
changeset 93 1a1e712e60fd
parent 92 c99f09bebe56
child 94 d1f59bbc2685
equal deleted inserted replaced
92:c99f09bebe56 93:1a1e712e60fd
    39             type_choices = [('S','Subtasks'),('D','Dependencies')]
    39             type_choices = [('S','Subtasks'),('D','Dependencies')]
    40             type = forms.ChoiceField(type_choices, widget=forms.RadioSelect)
    40             type = forms.ChoiceField(type_choices, widget=forms.RadioSelect)
    41 
    41 
    42         task = forms.ChoiceField(choices=task_choices)
    42         task = forms.ChoiceField(choices=task_choices)
    43     return myForm()
    43     return myForm()
       
    44 
       
    45 def AssignCreditForm(choices, instance=None):
       
    46     
       
    47     class myForm(forms.Form):
       
    48         user = forms.ChoiceField(choices=choices, required=True)
       
    49         points = forms.IntegerField(min_value=0,required=True)
       
    50     return myForm(instance) if instance else myForm()