def do_portlet_resource(self, request, response, **kwargs): """ This is the method invoked by the handler for :class:`portlet_resource` events. It is provided as a convenience as it is a bit easier to override than the handler. """ return notfound(request, response)
def do_portlet_resource(self, request, response, **kwargs): theme = kwargs.get("theme", "default") res_path = os.path.join\ (self._template_dir, "themes", theme, request.path) if os.path.exists(res_path): return tools.serve_file(request, response, res_path) res_path = os.path.join (self._template_dir, request.path) if os.path.exists(res_path): return tools.serve_file(request, response, res_path) return notfound(request, response)
def do_portlet_resource(self, request, response, **kwargs): theme = kwargs.get("theme", "default") res_path = os.path.join\ (self._template_dir, "themes", theme, request.path) if os.path.exists(res_path): return tools.serve_file(request, response, res_path) res_path = os.path.join(self._template_dir, request.path) if os.path.exists(res_path): return tools.serve_file(request, response, res_path) return notfound(request, response)