def task_description(request, task_id):
    try:
        task = Task.objects.get(pk=task_id)
    except Task.DoesNotExist:
        return Http404('The Task does not exist')
    if (task.type == task.CLASSIFICATION):
        url = reverse('classification:label_image', args=[task_id])
    elif (task.type == task.BOUNDING_BOX):
        url = reverse('boundingbox:process_image', args=[task_id])
    elif (task.type == task.LANDMARK):
        url = reverse('landmark:process_image', args=[task_id])
    elif (task.type == task.CARDIAC_SEGMENTATION):
        url = reverse('cardiac:segment_image', args=[task_id])
    elif (task.type == task.SPLINE_SEGMENTATION):
        url = reverse('spline_segmentation:segment_image', args=[task_id])
    else:
        raise NotImplementedError()
    return render(request, 'annotationweb/task_description.html', {'task': task, 'continue_url': url})
def task_description(request, task_id):
    try:
        task = Task.objects.get(pk=task_id)
    except Task.DoesNotExist:
        return Http404('The Task does not exist')
    if (task.type == task.CLASSIFICATION):
        url = reverse('classification:label_image', args=[task_id])
    elif (task.type == task.BOUNDING_BOX):
        url = reverse('boundingbox:process_image', args=[task_id])
    elif (task.type == task.LANDMARK):
        url = reverse('landmark:process_image', args=[task_id])
    elif (task.type == task.CARDIAC_SEGMENTATION):
        url = reverse('cardiac:segment_image', args=[task_id])
    elif (task.type == task.SPLINE_SEGMENTATION):
        url = reverse('spline_segmentation:segment_image', args=[task_id])
    else:
        raise NotImplementedError()
    return render(request, 'annotationweb/task_description.html', {'task': task, 'continue_url': url})