From 14bfbb06a562d5bbf15aaa110786f8f98c68a271 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Fri, 10 Aug 2012 21:22:12 -0400 Subject: [PATCH] If there is a missing static file, don't break the server, just leave a dead url --- .../pipeline_mako/templates/static_content.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/common/djangoapps/pipeline_mako/templates/static_content.html b/common/djangoapps/pipeline_mako/templates/static_content.html index 1737153260..c153da22fe 100644 --- a/common/djangoapps/pipeline_mako/templates/static_content.html +++ b/common/djangoapps/pipeline_mako/templates/static_content.html @@ -3,7 +3,13 @@ from staticfiles.storage import staticfiles_storage from pipeline_mako import compressed_css, compressed_js %> -<%def name='url(file)'>${staticfiles_storage.url(file)} +<%def name='url(file)'> +<% +try: + url = staticfiles_storage.url(file) +except: + url = file +%>${url} <%def name='css(group)'> % if settings.MITX_FEATURES['USE_DJANGO_PIPELINE']: