def any(self,path): epath = os.path.join(whereami, 'app/css/'+path) body = loadlocal(epath) if not isadmin(): self.response.headers['cache-control'] = 'no-transform,public,max-age=60' self.response.headers['content-type'] = 'text/css' self.response.write(body)
def any(self, path): epath = os.path.join(whereami, 'app/jscontrollers/'+path+'.js') logging.info("path = "+epath) body = loadlocal(epath) if not isadmin(): self.response.headers['cache-control'] = 'no-transform,public,max-age=60' self.response.headers['content-type'] = 'text/javascript' self.response.write(body)
def any(self,path): try: if isAppEngineDeploy(): body = resizedimageifneeded(path, "authorimg", "cdn.positiondial.com", "authorimg") else: result = urlfetch.fetch("http://www.positiondial.com/cdn/authorimg/"+path) body = result.content if not isadmin(): self.response.headers['cache-control'] = 'no-transform,public,max-age=7200' self.response.headers['content-type'] = 'image/jpg' self.response.write(body) except Exception as e: logging.exception(e) self.abort(404)
def any(self,path): body = load("/%s" % (path)) if not isadmin(): self.response.headers['cache-control'] = 'no-transform,public,max-age=1800' self.response.headers['content-type'] = 'image/jpg' self.response.write(body)