I wanted to enabling versioning to some of my javascript and css files as I was getting caching problems when working on the site. I read about CachedStaticFilesStorage in Django 1.6 and it seemed perfect. I modified my settings.py to the following settings:
STATIC_ROOT = 'staticfiles'
STATIC_URL = ''
# Additional locations of static files
STATICFILES_DIRS = (
)
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.CachedStaticFilesStorage'
As a test I then rewrote the most problematic of the css tags to see if it would start hashing the file path. I instead got a 500 error whenever I try and load the page.
Any ideas where I went wrong? Is there an additional step I missed?
The entry in the template:
{% block cssfiles %}
{% load static%}
<link href="{% static "/static/css/mapmaker.css" %}" media="screen">
{% endblock %}