def dispatch_request(self, request): url_adapter = url_map.bind_to_environ(request.environ) try: endpoint, values = url_adapter.match() page = pages[endpoint](self, request, url_adapter) response = page.process(**values) except NotFound, e: page = MissingPage(self, request, url_adapter) response = page.process()
def dispatch_request(self, request): url_adapter = url_map.bind_to_environ(request.environ) try: endpoint, values = url_adapter.match() page = pages[endpoint](self, request, url_adapter) response = page.process(**values) except NotFound: page = MissingPage(self, request, url_adapter) response = page.process() except HTTPException as e: return e return response or page.get_response()