Only use PipelineCachedStorage when not DEBUG

(imported from commit 6fea56b15122b9d54184f7c368f7e0113d581424)
This commit is contained in:
Keegan McAllister 2013-02-25 17:19:20 -05:00
parent 49e16b0ba6
commit c5bab96587
1 changed files with 9 additions and 1 deletions

View File

@ -191,7 +191,15 @@ STATICFILES_FINDERS = (
# PipelineCachedStorage inserts a file hash into filenames,
# to prevent the browser from using stale files from cache.
STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
#
# Unlike PipelineStorage, it requires the files to exist in
# STATIC_ROOT even for dev servers. So we only use
# PipelineCachedStorage when not DEBUG.
if DEBUG:
STATICFILES_STORAGE = 'pipeline.storage.PipelineStorage'
else:
STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
STATIC_ROOT = 'prod-static/collected'