def serve(self, embed=True): '''Sets the response headers and serves as a wsgi iter''' gridfs_file = self.rfile() return utils.serve_file(gridfs_file, self.filename, self.content_type, last_modified=self._id.generation_time, size=gridfs_file.length, embed=embed)
def tool_icon_css(self): """Serve stylesheet containing icon urls for every installed tool. """ css, md5 = g.tool_icon_css return utils.serve_file(StringIO(css), 'tool_icon_css', 'text/css', etag=md5)
def serve(self, embed=True): '''Sets the response headers and serves as a wsgi iter''' gridfs_file = self.rfile() return utils.serve_file(gridfs_file, self.filename, self.content_type, last_modified=self._id.generation_time, size=gridfs_file.length, embed=embed)
def tool_icon_css(self, *args, **kw): """ Serve stylesheet containing icon urls for every installed tool. If you want to use this, include it in your theme like: g.register_css('/nf/tool_icon_css?' + g.build_key, compress=False) """ css, md5 = g.tool_icon_css return utils.serve_file( StringIO(css), 'tool_icon_css', 'text/css', etag=md5)
def tool_icon_css(self, *args, **kw): """ Serve stylesheet containing icon urls for every installed tool. If you want to use this, include it in your theme like: g.register_css('/nf/tool_icon_css?' + g.build_key, compress=False) """ css, md5 = g.tool_icon_css return utils.serve_file(BytesIO(six.ensure_binary(css)), 'tool_icon_css', 'text/css', etag=md5)