Example #1
0
 def download_asset(self, size=None):
     e = HTTPOk()
     data, meta_data = self.assets_manager.load(self.filename, size)
     e.body = data
     e.content_type = str(meta_data["content-type"])
     e.title = meta_data["filename"]
     # e.headers['Cache-Control'] = 'max-age=0, must-revalidate, no-cache, no-store'
     raise e
Example #2
0
 def download_asset(self, size=None):
     e = HTTPOk()
     data, meta_data = self.assets_manager.load(self.filename, size)
     e.body = data
     e.content_type = str(meta_data['content-type'])
     e.title = meta_data['filename']
     #e.headers['Cache-Control'] = 'max-age=0, must-revalidate, no-cache, no-store'
     raise e
def init_portal_idea(self, url, comp, *args):
    r_feed = comp.render(rss.RssRenderer(), model='published_ideas')
    r_feed = r_feed.write_xmlstring()
    e = HTTPOk(headerlist=[('Content-Type', '')])
    e.body = '<?xml version="1.0" encoding="UTF-8"?>\n' + r_feed

    e.content_type = 'application/xml'

    raise e