Explorar el Código

Closes #8135: Append version when fetching static assets

jeremystretch hace 4 años
padre
commit
ceb941df81
Se han modificado 1 ficheros con 5 adiciones y 5 borrados
  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>