Fix template path directory
This commit is contained in:
parent
168853bef8
commit
d84738f6c6
1 changed files with 2 additions and 2 deletions
|
@ -389,8 +389,8 @@ class StaticFileHandler(tornado.web.StaticFileHandler):
|
|||
class Application(tornado.web.Application):
|
||||
def __init__(self, **settings):
|
||||
version = importlib.metadata.version(__package__)
|
||||
template_path = importlib.resources.path(__package__, "templates")
|
||||
settings.setdefault("template_path", template_path)
|
||||
with importlib.resources.path(__package__, "templates") as template_path:
|
||||
settings.setdefault("template_path", template_path)
|
||||
|
||||
paths = [
|
||||
(
|
||||
|
|
Loading…
Reference in a new issue