Mercurial > libervia-web
diff libervia/server/pages.py @ 1146:76d75423ef53
server: tasks manager first draft:
A new task manager will check /tasks directory of website to scripts to execute before launching the site. This allows to generate docs, scripts, or do anything else useful.
Generated files are put in in sat local dir, in cache, and are accessible from the website using the new "build_dir" variable.
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 25 Jan 2019 08:58:41 +0100 |
parents | 29eb15062416 |
children | 02afab1b15c5 |
line wrap: on
line diff
--- a/libervia/server/pages.py Fri Jan 25 08:41:43 2019 +0100 +++ b/libervia/server/pages.py Fri Jan 25 08:58:41 2019 +0100 @@ -392,6 +392,9 @@ ) request._signals_registered.append(signal) + def getBuildPath(self, session_data): + return session_data.cache_dir + self.vhost.site_name + def getPageByName(self, name): return self.vhost_root.getPageByName(name) @@ -1111,6 +1114,7 @@ self.template, media_path=u"/" + C.MEDIA_DIR, cache_path=session_data.cache_dir, + build_path=C.BUILD_DIR + u"/", main_menu=self.main_menu, **template_data) @@ -1308,6 +1312,7 @@ template, media_path="/" + C.MEDIA_DIR, cache_path=session_data.cache_dir, + build_path=C.BUILD_DIR + u"/", main_menu=self.main_menu, **template_data )