Просмотр исходного кода

Closes #8135: Append version when fetching static assets

jeremystretch 4 лет назад
Родитель
Сommit
ceb941df81
1 измененных файлов с 5 добавлено и 5 удалено
  1. 5 5
      netbox/templates/base/base.html

+ 5 - 5
netbox/templates/base/base.html

@@ -104,23 +104,23 @@
     {# Static resources #}
     <link
       rel="stylesheet"
-      href="{% static 'netbox-external.css'%}"
+      href="{% static 'netbox-external.css'%}?v={{ settings.VERSION }}"
       onerror="window.location='{% url 'media_failure' %}?filename=netbox-external.css'"
     />
     <link
       rel="stylesheet"
-      href="{% static 'netbox-light.css'%}"
+      href="{% static 'netbox-light.css'%}?v={{ settings.VERSION }}"
       onerror="window.location='{% url 'media_failure' %}?filename=netbox-light.css'"
     />
     <link
       rel="stylesheet"
-      href="{% static 'netbox-dark.css'%}"
+      href="{% static 'netbox-dark.css'%}?v={{ settings.VERSION }}"
       onerror="window.location='{% url 'media_failure' %}?filename=netbox-dark.css'"
     />
     <link
       rel="stylesheet"
       media="print"
-      href="{% static 'netbox-print.css'%}"
+      href="{% static 'netbox-print.css'%}?v={{ settings.VERSION }}"
       onerror="window.location='{% url 'media_failure' %}?filename=netbox-print.css'"
     />
     <link rel="icon" type="image/png" href="{% static 'netbox.ico' %}" />
@@ -129,7 +129,7 @@
     {# Javascript #}
     <script
       type="text/javascript"
-      src="{% static 'netbox.js' %}"
+      src="{% static 'netbox.js' %}?v={{ settings.VERSION }}"
       onerror="window.location='{% url 'media_failure' %}?filename=netbox.js'">
     </script>