@staff_member_required
def new_dataset(request):
    if (request.method == 'POST'):
        form = DatasetForm(request.POST)
        if form.is_valid():
            form.save()
            messages.success(request, 'New dataset created')
            return redirect('datasets')
    else:
        form = DatasetForm()
    return render(request, 'annotationweb/new_dataset.html', {'form': form})
@staff_member_required
def new_dataset(request):
    if (request.method == 'POST'):
        form = DatasetForm(request.POST)
        if form.is_valid():
            form.save()
            messages.success(request, 'New dataset created')
            return redirect('datasets')
    else:
        form = DatasetForm()
    return render(request, 'annotationweb/new_dataset.html', {'form': form})