'Response middleware'

def process_response(self, request, response):

    if (not hasattr(request, '_desktop_app')):
        logging.debug('No    desktop_app    known    for    request.')
        return response
    for middleware in reversed(self._get_middlewares(request._desktop_app, 'response')):
        response = middleware(request, response)
    return response
