tornado static content

outcastgeek

How to directly serve static content with Tornado Web …

Sample:

1
2
3
4
application = tornado.web.Application([
    (r"/", MainHandler),
    (r"/images/(.*)", tornado.web.StaticFileHandler, {"path": os.path.join(os.path.dirname(__file__), "static/images")}),
], **settings)

The images folder inside the static content folder is now url accessible. Any questions, feedback, or comments?