Commit e54e840e by Gabe Mulley Committed by Gabe Mulley

serve assets on devstack

parent a90fdb74
......@@ -24,6 +24,7 @@ path.append(DJANGO_ROOT)
########## DEBUG CONFIGURATION
# See: https://docs.djangoproject.com/en/dev/ref/settings/#debug
DEBUG = False
ENABLE_INSECURE_STATIC_FILES = False
########## END DEBUG CONFIGURATION
......
......@@ -4,12 +4,14 @@ from analytics_dashboard.settings.base import *
from analytics_dashboard.settings.yaml_config import *
from analytics_dashboard.settings.logger import get_logger_config
# Enable offline compression of CSS/JS
COMPRESS_ENABLED = True
COMPRESS_OFFLINE = True
# Use r.js to combine RequireJS files
RJS_OPTIMIZATION_ENABLED = True
if not DEBUG:
# Enable offline compression of CSS/JS
COMPRESS_ENABLED = True
COMPRESS_OFFLINE = True
# Use r.js to combine RequireJS files
RJS_OPTIMIZATION_ENABLED = True
# Minify CSS
COMPRESS_CSS_FILTERS += [
......
......@@ -8,6 +8,7 @@ from django.core.urlresolvers import reverse_lazy
from django.views import defaults
from django.views.generic import RedirectView
from django.views.i18n import javascript_catalog
from django.contrib.staticfiles import views as static_views
# pylint suggests importing analytics_dashboard.core, which causes errors in our AMI
# pylint: disable=relative-import
......@@ -67,3 +68,8 @@ if settings.DEBUG: # pragma: no cover
urlpatterns += [
url(r'^__debug__/', include(debug_toolbar.urls)),
]
if settings.ENABLE_INSECURE_STATIC_FILES:
urlpatterns += [
url(r'^static/(?P<path>.*)$', static_views.serve),
]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment