def wrapped(get_response): handler = middleware(get_response) return django_only_request_handler(get_response, handler)