diff libervia/server/server.py @ 1256:08cd652dea14

server, pages, tasks (brython): common_scripts: - scripts common to all pages can now be put in root `_browser` dir - `scripts` list is not set in `dyn_data`'s `template` anymore, but directly in a root `scripts` key (because it's not data which are sent verbatim to the template renderer) - if an `__init__.py` script is found in root `_browser` dir, brython task will add it to template scripts.
author Goffi <goffi@goffi.org>
date Sun, 03 May 2020 18:15:22 +0200
parents 6d49fae517ba
children 1ec41ac1e7cf
line wrap: on
line diff
--- a/libervia/server/server.py	Sun May 03 17:06:14 2020 +0200
+++ b/libervia/server/server.py	Sun May 03 18:15:22 2020 +0200
@@ -186,6 +186,8 @@
         self.site_path = Path(site_path)
         self.named_pages = {}
         self.browser_modules = {}
+        # template dynamic data used in all pages
+        self.dyn_data_common = {"scripts": []}
         self.uri_callbacks = {}
         self.pages_redirects = {}
         self.cached_urls = {}