def index(request):
    context = {}
    if is_annotater(request.user):
        tasks = Task.objects.filter(user=request.user)
        get_task_statistics(tasks, request.user)
        context['tasks'] = tasks
        return render(request, 'annotationweb/index_annotater.html', context)
    else:
        tasks = Task.objects.all()
        get_task_statistics(tasks, request.user)
        context['tasks'] = tasks
        return render(request, 'annotationweb/index_admin.html', context)
def index(request):
    context = {}
    if is_annotater(request.user):
        tasks = Task.objects.filter(user=request.user)
        get_task_statistics(tasks, request.user)
        context['tasks'] = tasks
        return render(request, 'annotationweb/index_annotater.html', context)
    else:
        tasks = Task.objects.all()
        get_task_statistics(tasks, request.user)
        context['tasks'] = tasks
        return render(request, 'annotationweb/index_admin.html', context)