From ebced8dab9e6a95d409994a7f1336f39c136910f Mon Sep 17 00:00:00 2001 From: Dorian Lesbre <dorian.lesbre@gmail.com> Date: Mon, 3 May 2021 16:42:09 +0200 Subject: [PATCH] Added query string to force css reload on change --- home/templates/base.html | 2 +- site_settings/constants.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/home/templates/base.html b/home/templates/base.html index e8fcdaf..6d1c33c 100644 --- a/home/templates/base.html +++ b/home/templates/base.html @@ -12,7 +12,7 @@ <meta name="keywords" content="Interludes ENS événement COF {% if settings.date_start %}{{ settings.date_start.year }} {% endif %}InterENS"> <link rel="icon" type="image/png" href="{% static 'imgs/favicon.ico' %}"> - <link rel="stylesheet" type="text/css" href="{% static 'css/style.css' %}"> + <link rel="stylesheet" type="text/css" href="{% static 'css/style.css' %}?v={{ constants.CSS_VERSION }}"> <link rel="stylesheet" type="text/css" href="{% static 'css/font-awesome-all.min.css' %}"> {% block head %}{% endblock %} </head> diff --git a/site_settings/constants.py b/site_settings/constants.py index 5775150..02662ed 100644 --- a/site_settings/constants.py +++ b/site_settings/constants.py @@ -5,3 +5,6 @@ WEBSITE_VERSION_DATE = "2021-04-30" WEBSITE_FULL_VERSION = "{} - {}".format( WEBSITE_VERSION, WEBSITE_VERSION_DATE ) + +# Update this to force reload of cached css +CSS_VERSION = "1.0" -- GitLab