diff --git a/webapp/graphite/dashboard/views.py b/webapp/graphite/dashboard/views.py index 80750c7d5..d7a12e9d3 100644 --- a/webapp/graphite/dashboard/views.py +++ b/webapp/graphite/dashboard/views.py @@ -1,4 +1,5 @@ import re +import os import errno from os.path import getmtime @@ -126,6 +127,10 @@ def dashboard(request, name=None): debug = request.GET.get('debug', False) theme = request.GET.get('theme', config.ui_config['theme']) css_file = finders.find('css/dashboard-%s.css' % theme) + if css_file is None: + # Also search in STATIC_ROOT for dist packages + css_file = os.path.isfile(os.path.join(settings.STATIC_ROOT, + 'css/dashboard-%s.css' % theme)) if css_file is None: initialError = "Invalid theme '%s'" % theme theme = config.ui_config['theme'] diff --git a/webapp/graphite/settings.py b/webapp/graphite/settings.py index f5ca1846d..2cfd9447d 100644 --- a/webapp/graphite/settings.py +++ b/webapp/graphite/settings.py @@ -244,6 +244,10 @@ from graphite.app_settings import * # noqa +STATICFILES_DIRS = ( + join(WEBAPP_DIR, 'content'), +) + # Handle renamed timeout settings FIND_TIMEOUT = FIND_TIMEOUT or REMOTE_FIND_TIMEOUT or 3.0 FETCH_TIMEOUT = FETCH_TIMEOUT or REMOTE_FETCH_TIMEOUT or 6.0 @@ -294,10 +298,6 @@ except ImportError: pass -STATICFILES_DIRS = ( - STATIC_ROOT, -) - if DATABASES is None: DATABASES = { 'default': {