def wrap(request, *args, **kwargs): if not user_has_override(request.user, override_name): if isinstance(alternate, type): response = alternate() else: response = alternate return response return fn(request, *args, **kwargs)
def has_finial_flag(user, flag): return user_has_override(user, flag)