Opened 13 years ago
Closed 13 years ago
#18364 closed Bug (invalid)
Can't server static files with version information
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Template system | Version: | 1.4 |
Severity: | Normal | Keywords: | |
Cc: | f@… | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Hi,
from the source code it seams that I can't server staticfiles with a version information.
In my template I have the following:
{% load staticfiles %} <script language="javascript" type="text/javascript" src="{% static "js/jquery.min.js?v=1.4.2" %}"></script>
This will result in this URL:
http://hostname/static/js/jquery.min.js%3Fv%3D1.4.2
See the escaped "?" sign which makes the version number a part of the URL and not a get paramter.
Am I missing something?
Sincerely, Fabian
Note:
See TracTickets
for help on using tickets.
I presume this is by design - so that, for instance, you can download files that have a '?' in the name. The workaround is simple - put the version part outside the
{% static %}
tag.