equal
deleted
inserted
replaced
4 class TaskCreateForm(forms.ModelForm): |
4 class TaskCreateForm(forms.ModelForm): |
5 class Meta: |
5 class Meta: |
6 model = Task |
6 model = Task |
7 fields = ['title', 'desc', 'tags', 'credits'] |
7 fields = ['title', 'desc', 'tags', 'credits'] |
8 publish = forms.BooleanField(required=False) |
8 publish = forms.BooleanField(required=False) |
|
9 |
|
10 def AddMentorForm(choices,instance=None): |
|
11 """ return a form object with appropriate choices """ |
|
12 |
|
13 class myform(forms.Form): |
|
14 mentor = forms.ChoiceField(choices=choices, required=True) |
|
15 form = myform(instance=instance) if instance else myform() |
|
16 return form |
|
17 |
|
18 def ClaimTaskForm(models.ModelForm): |
|
19 class Meta: |
|
20 model = Claim |
|
21 fields = ['message'] |