Exemple #1
0
 def save(self, user):
     task = Task()
     task.description = self.cleaned_data['description'].capitalize()
     task.created_by = user
     task.save()
     task.save()
     return task
Exemple #2
0
 def save(self, user):
     task = Task()
     task.description = self.cleaned_data['description'].capitalize()
     task.context = Context.objects.get(id=self.cleaned_data['context'].id)
     task.team = Team.objects.get(id=self.cleaned_data['team'].id)
     task.priority = self.cleaned_data['priority']
     task.due_date = self.cleaned_data['due']
     task.show_from = self.cleaned_data['show_from']
     task.created_by = user
     if self.cleaned_data['assign_to_me'] == 'on':
         task.assigned_to = user
     task.save()
     return task