feat: pass version on static files (#1318)

This commit is contained in:
Markos Gogoulos
2025-07-07 11:54:02 +03:00
committed by GitHub
parent a607996bfa
commit df98b65704
4 changed files with 10 additions and 7 deletions

View File

@ -1 +1 @@
VERSION = "6.2.0"
VERSION = "6.3.0"

View File

@ -1,5 +1,7 @@
from django.conf import settings
from cms.version import VERSION
from .frontend_translations import get_translation, get_translation_strings
from .methods import is_mediacms_editor, is_mediacms_manager
@ -37,6 +39,7 @@ def stuff(request):
ret["USE_SAML"] = settings.USE_SAML
ret["USE_RBAC"] = settings.USE_RBAC
ret["USE_ROUNDED_CORNERS"] = settings.USE_ROUNDED_CORNERS
ret["VERSION"] = VERSION
if request.user.is_superuser:
ret["DJANGO_ADMIN_URL"] = settings.DJANGO_ADMIN_URL

View File

@ -1,3 +1,3 @@
{% load static %}
<script src="{% static "js/_commons.js" %}"></script>
<script src="{% static "js/_commons.js" %}?v={{ VERSION }}"></script>

View File

@ -22,10 +22,10 @@
<link href="{% static "lib/gfonts/gfonts.css" %}" rel="stylesheet">
{% endif %}
<link href="{% static "css/_commons.css" %}" rel="preload" as="style">
<link href="{% static "css/_commons.css" %}" rel="stylesheet">
<link href="{% static "css/_commons.css" %}?v={{ VERSION }}" rel="preload" as="style">
<link href="{% static "css/_commons.css" %}?v={{ VERSION }}" rel="stylesheet">
<link href="{% static "css/_extra.css" %}" rel="preload" as="style">
<link href="{% static "css/_extra.css" %}" rel="stylesheet">
<link href="{% static "css/_extra.css" %}?v={{ VERSION }}" rel="preload" as="style">
<link href="{% static "css/_extra.css" %}?v={{ VERSION }}" rel="stylesheet">
<link href="{% static "js/_commons.js" %}" rel="preload" as="script">
<link href="{% static "js/_commons.js" %}?v={{ VERSION }}" rel="preload" as="script">