Fix Extension setup and factory import.
Moved ReactRouterHandler to be with the other handlers
This commit is contained in:
@ -233,4 +233,19 @@ class HttpHandler(tornado.web.RequestHandler):
|
||||
self.finish()
|
||||
|
||||
|
||||
##
|
||||
# Customised handler for react router URLS
|
||||
#
|
||||
# This routes all URLs to the same path, so that React can handle the path etc
|
||||
##
|
||||
class ReactRouterHandler(tornado.web.StaticFileHandler):
|
||||
def initialize(self, path):
|
||||
self.path = path
|
||||
self.absolute_path = path
|
||||
self.dirname = path.parent
|
||||
self.filename = path.name
|
||||
super().initialize(self.dirname)
|
||||
|
||||
def get(self, path=None, include_body=True):
|
||||
return super().get(self.path, include_body)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user