From 9531d62f57e863373bff44510472f4ad060d5260 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Fri, 8 Dec 2023 14:30:41 +0100 Subject: [PATCH] in webdev mode make page auto-refresh every 3 seconds --- deploy-chatmail/src/deploy_chatmail/www.py | 1 + www/src/page-layout.html | 3 +++ 2 files changed, 4 insertions(+) diff --git a/deploy-chatmail/src/deploy_chatmail/www.py b/deploy-chatmail/src/deploy_chatmail/www.py index 15d5e093..d06aa709 100644 --- a/deploy-chatmail/src/deploy_chatmail/www.py +++ b/deploy-chatmail/src/deploy_chatmail/www.py @@ -71,6 +71,7 @@ def main(): reporoot = path.joinpath("../../../").resolve() inipath = reporoot.joinpath("chatmail.ini") config = get_ini_settings(chatmail_domain, inipath) + config["webdev"] = True www_path = reporoot.joinpath("www") src_path = www_path.joinpath("src") stats = None diff --git a/www/src/page-layout.html b/www/src/page-layout.html index 1c92d6e8..d999da75 100644 --- a/www/src/page-layout.html +++ b/www/src/page-layout.html @@ -2,6 +2,9 @@ + {% if config.webdev %} + + {% endif %} {{ config.mail_domain }} {{ pagename }}