From bd35d40c482d9cfdc182d11a212cb772bb0aee2c Mon Sep 17 00:00:00 2001 From: Xevion Date: Sun, 27 Mar 2022 05:06:07 -0500 Subject: [PATCH] Add page generation time to footer --- create_app.py | 4 ++++ templates/layouts/footer.html | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/create_app.py b/create_app.py index 5f318ee..c73bb7c 100644 --- a/create_app.py +++ b/create_app.py @@ -50,6 +50,10 @@ def create_app(): db.session.add(current_user) db.session.commit() + @app.context_processor + def inject(): + return dict(now=datetime.utcnow) + # CLI commands setup @app.shell_context_processor def shell_context(): diff --git a/templates/layouts/footer.html b/templates/layouts/footer.html index 17c9e46..103aacf 100644 --- a/templates/layouts/footer.html +++ b/templates/layouts/footer.html @@ -10,6 +10,6 @@
  • WXYZ