fix: version static assets on test deployment

This commit is contained in:
Md Bayazid Bostame
2026-03-30 12:51:21 +02:00
parent 97c1cad3ef
commit 34b5e98b66
4 changed files with 11 additions and 7 deletions

View File

@@ -1,4 +1,5 @@
from .branding import get_branding_context, get_trial_context
from django.conf import settings
from .models import UserNotification
from .roles import template_role_context
@@ -18,4 +19,5 @@ def role_context(request):
)
else:
context.update({'header_notifications': [], 'header_unread_notification_count': 0})
context.update({'static_asset_version': settings.STATIC_ASSET_VERSION})
return context

View File

@@ -7,9 +7,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{% block title %}{% endblock %}</title>
<link rel="icon" href="{{ portal_favicon_url }}" />
<link rel="stylesheet" href="{% static 'workflows/css/design_system.css' %}" />
<link rel="stylesheet" href="{% static 'workflows/css/buttons.css' %}" />
<link rel="stylesheet" href="{% static 'workflows/css/app_chrome.css' %}" />
<link rel="stylesheet" href="{% static 'workflows/css/design_system.css' %}?v={{ static_asset_version }}" />
<link rel="stylesheet" href="{% static 'workflows/css/buttons.css' %}?v={{ static_asset_version }}" />
<link rel="stylesheet" href="{% static 'workflows/css/app_chrome.css' %}?v={{ static_asset_version }}" />
{% block extra_css %}{% endblock %}
{% block extra_head %}{% endblock %}
</head>
@@ -93,8 +93,8 @@
</div>
</div>
</div>
<script src="{% static 'workflows/js/confirm_dialog.js' %}"></script>
<script src="{% static 'workflows/js/action_progress.js' %}"></script>
<script src="{% static 'workflows/js/confirm_dialog.js' %}?v={{ static_asset_version }}"></script>
<script src="{% static 'workflows/js/action_progress.js' %}?v={{ static_asset_version }}"></script>
{% block extra_scripts %}{% endblock %}
</body>
</html>

View File

@@ -10,7 +10,7 @@
{% block extra_css %}
<link rel="stylesheet" href="{% static 'workflows/css/requests_dashboard.css' %}" />
<link rel="stylesheet" href="{% static 'workflows/css/requests_dashboard.css' %}?v={{ static_asset_version }}" />
{% endblock %}
{% block shell_body %}
@@ -298,5 +298,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{% static 'workflows/js/requests_dashboard.js' %}"></script>
<script src="{% static 'workflows/js/requests_dashboard.js' %}?v={{ static_asset_version }}"></script>
{% endblock %}