Get unversioned static file url while using CachedStaticFilesStorage

15 views
Skip to first unread message

Dheerendra Rathor

unread,
Oct 11, 2015, 2:28:10 PM10/11/15
to Django users
Hello all,

I want to retrieve static file url without version number for a specific static file url while using staticfiles app. 

Is there any way to achieve this with {% static %} tag?

Tim Graham

unread,
Oct 12, 2015, 10:25:31 PM10/12/15
to Django users
If you used the "as var" syntax: {% static "myapp/css/base.css" as admin_base_css %}, then you could write a custom template filter that removes the version suffix and then apply it to that variable.
Reply all
Reply to author
Forward
0 new messages