Fix template path directory

This commit is contained in:
Correl Roush 2023-07-06 23:55:14 -04:00
parent 168853bef8
commit d84738f6c6

View file

@ -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 = [
(