I am trying this:
favicon_path = '/path/to/favicon.ico'
settings = {'debug': True,
'static_path': os.path.join(PATH, 'static')}
handlers = [(r'/', WebHandler),
(r'/favicon.ico', tornado.web.StaticFileHandler, {'path': favicon_path})]
application = tornado.web.Application(handlers, **settings)
application.listen(port)
tornado.ioloop.IOLoop.instance().start()
But it keeps serving the favicon.ico
that I have in my static_path (I have two different favicon.ico
's in two separate paths, as indicated above, but I want to be able to override the one in the static_path
).
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…