Mercurial > libervia-web
diff libervia/server/pages.py @ 1318:38875bc292ff
pages: add `media_path` and `build_path` in template data for error pages.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 01 Aug 2020 16:47:24 +0200 |
parents | a7ab4d244982 |
children | 6e2821e78489 |
line wrap: on
line diff
--- a/libervia/server/pages.py Sat Aug 01 16:47:24 2020 +0200 +++ b/libervia/server/pages.py Sat Aug 01 16:47:24 2020 +0200 @@ -1292,6 +1292,8 @@ rendered = self.host.renderer.render( template, theme=session_data.theme or self.default_theme, + media_path=f"/{C.MEDIA_DIR}", + build_path=f"/{C.BUILD_DIR}/", site_themes=self.site_themes, error_code=code, **template_data @@ -1406,8 +1408,8 @@ site_themes=self.site_themes, page_url=self.getURL(), media_path=f"/{C.MEDIA_DIR}", + build_path=f"/{C.BUILD_DIR}/", cache_path=session_data.cache_dir, - build_path=f"/{C.BUILD_DIR}/", main_menu=self.main_menu, **template_data) @@ -1625,9 +1627,9 @@ theme=session_data.theme or self.default_theme, site_themes=self.site_themes, page_url=self.getURL(), - media_path="/" + C.MEDIA_DIR, + media_path=f"/{C.MEDIA_DIR}", + build_path=f"/{C.BUILD_DIR}/", cache_path=session_data.cache_dir, - build_path="/" + C.BUILD_DIR + "/", main_menu=self.main_menu, **template_data )