@handle_response_format
@treeio_login_required
def task_time_slot_start(request, task_id, response_format='html'):
 task = get_object_or_404(Task, pk=task_id)
 if (not request.user.profile.has_permission(task, mode='x')):
  return user_denied(request, message="You don't have access to this Task")
 if (not task.is_being_done_by(request.user.profile)):
  task_time_slot = TaskTimeSlot(task=task, time_from=datetime.now(), user=request.user.profile)
  task_time_slot.save()
  task_time_slot.set_user_from_request(request)
 return HttpResponseRedirect(reverse('projects_task_view', args=[task_id]))

@ handle_response_format @ treeio_login_required def task_time_slot_start ( request , task_id , response_format = 'html' ) : task = get_object_or_404 ( Task , pk = task_id ) if ( not request . user . profile . has_permission ( task , mode = 'x' ) ) : return user_denied ( request , message = "You don't have access to this Task" ) if ( not task . is_being_done_by ( request . user . profile ) ) : task_time_slot = TaskTimeSlot ( task = task , time_from = datetime . now ( ) , user = request . user . profile ) task_time_slot . save ( ) task_time_slot . set_user_from_request ( request ) return HttpResponseRedirect ( reverse ( 'projects_task_view' , args = [ task_id ] ) )
start tasktimeslot for preselected task .