Beispiel #1
0
 def GET(self):
     url = config.favicon_url
     name = url.lstrip('/')
     ext = name.split('.')[-1]
     cType = {
         "png": "images/png",
         "jpg": "images/jpeg",
         "gif": "images/gif",
         "ico": "images/x-icon"
     }
     if name in os.listdir(config.static_dir):
         web.header('Content-Type', cType[ext])
         return open('%s/%s' % (config.static_dir, name), 'rb').read()
     params = entryService.error(url)
     raise web.notfound(render.error(params))
Beispiel #2
0
 def GET(self):
     url = config.favicon_url
     name = url.lstrip('/')
     ext = name.split('.')[-1]
     cType = {
         "png":"images/png",
         "jpg":"images/jpeg",
         "gif":"images/gif",
         "ico":"images/x-icon"
     }
     if name in os.listdir(config.static_dir):
         web.header('Content-Type', cType[ext])
         return open('%s/%s' %(config.static_dir, name), 'rb').read()
     params =  entryService.error(url)
     raise web.notfound(render.error(params))
Beispiel #3
0
 def GET(self, url):
     params = entryService.error(url)
     #return render.error(params)
     raise web.notfound(render.error(params))
Beispiel #4
0
 def GET(self, url):
     params = entryService.error(url)
     #return render.error(params)
     raise web.notfound(render.error(params))