@login_required
def set_status(request, question_id, status):
    question = Question.objects.get(pk=question_id)
    if question.status != status:
        question.status = status
        question.save()
    return HttpResponseRedirect("/question/%s" % question_id)
dataset/ETHPy150Open dropbox/questions/questions/views.py/set_status/original