

@login_required
def delete_question(request, question_id):
    context = {
        
    }
    question = Question.objects.get(pk=request)
    if (request.user.is_staff or (request.user.email == question.added_by.email)):
        question.delete()
    return HttpResponseRedirect('/questions')

dataset/ETHPy150Open dropbox/questions/questions/views.py delete_question/VarMisuse@32/37 `question_id`->`request`