def delete_task(request, object_id):
  task = get_object_or_404(Task, pk=object_id)
  return main.delete_stage(request, "mturk", "task", object_id)
Beispiel #2
0
def delete_task(request, object_id):
    task = get_object_or_404(Task, pk=object_id)
    return main.delete_stage(request, "mturk", "task", object_id)
def delete_session(request, object_id):
  session = get_object_or_404(Session, pk=object_id)
  if not request.user.is_superuser:
    if request.user != session.owner:
      return HttpResponseRedirect('/admin/?next=%s' % request.path)
  return main.delete_stage(request, "mturk", "session", object_id)
Beispiel #4
0
def delete_session(request, object_id):
    session = get_object_or_404(Session, pk=object_id)
    if not request.user.is_superuser:
        if request.user != session.owner:
            return HttpResponseRedirect('/admin/?next=%s' % request.path)
    return main.delete_stage(request, "mturk", "session", object_id)