changeset 1148:3c7a64adfd42

pages: use absolute path for build_path + added page_url to template (which is getURL() without argument)
author Goffi <goffi@goffi.org>
date Sat, 26 Jan 2019 20:15:24 +0100
parents 02afab1b15c5
children b290f21e8466
files libervia/server/pages.py
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libervia/server/pages.py	Sat Jan 26 20:14:09 2019 +0100
+++ b/libervia/server/pages.py	Sat Jan 26 20:15:24 2019 +0100
@@ -1116,9 +1116,10 @@
 
         return self.host.renderer.render(
             self.template,
+            page_url=self.getURL(),
             media_path=u"/" + C.MEDIA_DIR,
             cache_path=session_data.cache_dir,
-            build_path=C.BUILD_DIR + u"/",
+            build_path=u"/" + C.BUILD_DIR + u"/",
             main_menu=self.main_menu,
             **template_data)
 
@@ -1314,9 +1315,10 @@
 
         return self.host.renderer.render(
             template,
-            media_path="/" + C.MEDIA_DIR,
+            page_url=self.getURL(),
+            media_path=u"/" + C.MEDIA_DIR,
             cache_path=session_data.cache_dir,
-            build_path=C.BUILD_DIR + u"/",
+            build_path=u"/" + C.BUILD_DIR + u"/",
             main_menu=self.main_menu,
             **template_data
         )