@staff_member_required
def new_task(request):
    if (request.method == 'POST'):
        form = TaskForm(request.POST)
        if form.is_valid():
            form.save()
            return redirect('index')
    else:
        form = TaskForm()
    context = {'form': form}
    return render(request, 'annotationweb/new_task.html', context)
@staff_member_required
def new_task(request):
    if (request.method == 'POST'):
        form = TaskForm(request.POST)
        if form.is_valid():
            form.save()
            return redirect('index')
    else:
        form = TaskForm()
    context = {'form': form}
    return render(request, 'annotationweb/new_task.html', context)