aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/web_ui/root.py
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-10-22 14:49:37 +0200
committerWojtek Kosior <koszko@koszko.org>2022-10-22 14:54:42 +0200
commit44c09ab27ce8407f4fc5c75df9cdf309df8463eb (patch)
tree648f2b53456f9886b5e243a1734073342d8ab154 /src/hydrilla/proxy/web_ui/root.py
parent59a4b477dd922d2f839a717fe199501e7cb71e6e (diff)
downloadhaketilo-hydrilla-44c09ab27ce8407f4fc5c75df9cdf309df8463eb.tar.gz
haketilo-hydrilla-44c09ab27ce8407f4fc5c75df9cdf309df8463eb.zip
[proxy] extract potentially reusable HTML jinja templates into a separate directory
Diffstat (limited to 'src/hydrilla/proxy/web_ui/root.py')
-rw-r--r--src/hydrilla/proxy/web_ui/root.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/hydrilla/proxy/web_ui/root.py b/src/hydrilla/proxy/web_ui/root.py
index d775730..4430bb6 100644
--- a/src/hydrilla/proxy/web_ui/root.py
+++ b/src/hydrilla/proxy/web_ui/root.py
@@ -48,6 +48,7 @@ import werkzeug
from ...translations import translation as make_translation
from ... import versions
from ... import item_infos
+from ... import common_jinja_templates
from .. import state as st
from .. import http_messages
from . import rules
@@ -93,9 +94,12 @@ class WebUIAppImpl(_app.WebUIApp):
self._haketilo_app_lock = Lock()
+ loader = jinja2.PackageLoader(__package__)
+ combined_loader = common_jinja_templates.combine_with_loaders([loader])
+
self.jinja_options = {
**self.jinja_options,
- 'loader': jinja2.PackageLoader(__package__),
+ 'loader': combined_loader,
'autoescape': jinja2.select_autoescape(['html.jinja']),
'lstrip_blocks': True,
'extensions': [