pytask/taskapp/forms.py
changeset 555 20fe9db8bc81
parent 526 9c0c88d129dd
equal deleted inserted replaced
554:18c47ba53250 555:20fe9db8bc81
    99         fields = ['title', 'desc' , 'pynts', 'tags_field']
    99         fields = ['title', 'desc' , 'pynts', 'tags_field']
   100 
   100 
   101 class EditTextbookForm(forms.ModelForm):
   101 class EditTextbookForm(forms.ModelForm):
   102 
   102 
   103     class Meta:
   103     class Meta:
   104         model = TextBook
   104         model = Task
   105         fields = ['name', 'chapters', 'tags_field']
   105         fields = ['title', 'desc', 'pynts', 'tags_field']
   106 
   106 
   107 def AddTaskForm(task_choices, is_plain=False):
   107 def AddTaskForm(task_choices, is_plain=False):
   108     """ if is_plain is true, it means the task has no subs/deps.
   108     """ if is_plain is true, it means the task has no subs/deps.
   109     so we also give a radio button to choose between subs and dependencies.
   109     so we also give a radio button to choose between subs and dependencies.
   110     else we only give choices.
   110     else we only give choices.