@login_required
def view_question(request, question_id):
    context = {
        "active_revision": True,
        "settings": Settings.get_by_user(request.user),
    }

    revision_id = request.GET.get("revision_id", None)
    question = Question.objects.get(pk=question_id)
    active_revision = question.get_active_revision()
    revision = active_revision

    if revision_id is not None or revision.id != revision_id:
        context["active_revision"] = False
        revision = QuestionRevision.objects.get(question_id=question_id, pk=revision_id)


    context["question"] = question
    context["revision"] = revision
    return r2r(request, "view_question", context)
dataset/ETHPy150Open dropbox/questions/questions/views.py/view_question/operator `and` -> `or`