taskapp/forms/task.py
changeset 91 1b5ad4b7c40e
parent 90 b2426897ff18
child 92 c99f09bebe56
equal deleted inserted replaced
90:b2426897ff18 91:1b5ad4b7c40e
    18 class ClaimTaskForm(forms.ModelForm):
    18 class ClaimTaskForm(forms.ModelForm):
    19     class Meta:
    19     class Meta:
    20         model = Claim
    20         model = Claim
    21         fields = ['message']
    21         fields = ['message']
    22 
    22 
    23 def AssignTaskForm(choices, instance=None):
    23 def ChoiceForm(choices, instance=None):
    24     """ return a form object with appropriate choices """
    24     """ return a form object with appropriate choices """
    25     
    25     
    26     class myform(forms.Form):
    26     class myform(forms.Form):
    27         user = forms.ChoiceField(choices=choices, required=True)
    27         user = forms.ChoiceField(choices=choices, required=True)
    28     form = myform()
    28     form = myform()