From 72041ee520d7164c5867ce218fb0940cd5e3edef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Casaj=C3=BAs?= Date: Thu, 30 Nov 2023 11:48:55 +0100 Subject: [PATCH] Show BF banner until end of promotion (#1953) --- server.py | 4 +++- templates/base.html | 2 +- templates/dashboard/pricing.html | 29 ++++++++++++++++------------- 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/server.py b/server.py index 9f62e5a4..f0f57a3d 100644 --- a/server.py +++ b/server.py @@ -407,8 +407,10 @@ def jinja2_filter(app): @app.context_processor def inject_stage_and_region(): + now = arrow.now() return dict( - YEAR=arrow.now().year, + YEAR=now.year, + NOW=now, URL=URL, SENTRY_DSN=SENTRY_FRONT_END_DSN, VERSION=SHA1, diff --git a/templates/base.html b/templates/base.html index 3a94b823..f53a8ee6 100644 --- a/templates/base.html +++ b/templates/base.html @@ -86,7 +86,7 @@
- {% if current_user.is_authenticated and current_user.should_show_upgrade_button() %} + {% if NOW.timestamp < 1701475201 and current_user.is_authenticated and current_user.should_show_upgrade_button() %}