diff libervia/server/pages.py @ 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 94f9d81a475e
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
         )