From 755b117daab6bb1334d492a5b37ebf2a28c7fe1b Mon Sep 17 00:00:00 2001 From: Piotr Date: Fri, 1 Feb 2019 11:56:46 +0100 Subject: [PATCH] Remove STATICFILES_DIRS from settings.py and add explanation in local_settings.py Fixes dashboards which were broken with last commit --- webapp/graphite/local_settings.py.example | 26 +++++++++++++++++++++++ webapp/graphite/settings.py | 5 ----- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/webapp/graphite/local_settings.py.example b/webapp/graphite/local_settings.py.example index b5378fae4d..1967f4dc33 100644 --- a/webapp/graphite/local_settings.py.example +++ b/webapp/graphite/local_settings.py.example @@ -94,6 +94,28 @@ DEFAULT_XFILES_FACTOR = 0 #FIND_TIMEOUT = 3.0 # Timeout for metric find requests #FETCH_TIMEOUT = 3.0 # Timeout to fetch series data + +##################################### +# Static Files # +##################################### +# +# Graphite servers static files (.html, .css, .js) directly from the +# application by using whitenoise. If you want to serve the files from a +# webserver instead: +# - Uncomment following lines +# - Point STATIC_ROOT to the directory which is served by your webserver +# - Run `django-admin collectstatic --noinput --settings=graphite.settings` +# - Disable whitenoise in wsgi.py and app_settings.py +# - Configure your webserver accordingly + +# from os.path import abspath, dirname, join +# STATICFILES_DIRS = ( +# join(dirname(abspath(__file__)), 'static'), +# ) + +# STATIC_ROOT = '/path/to/your/webservers/shared/directory' + + ##################################### # Filesystem Paths # ##################################### @@ -140,6 +162,7 @@ DEFAULT_XFILES_FACTOR = 0 # 'graphite.finders.ceres.CeresFinder', # ) + ##################################### # Email Configuration # ##################################### @@ -358,6 +381,7 @@ DEFAULT_XFILES_FACTOR = 0 # This should usually match the value configured in Carbon. #REPLICATION_FACTOR = 1 + ##################################### # TagDB Settings # ##################################### @@ -382,6 +406,7 @@ DEFAULT_XFILES_FACTOR = 0 # Does the remote TagDB support autocomplete? #TAGDB_HTTP_AUTOCOMPLETE = False + ##################################### # Function plugins # ##################################### @@ -389,6 +414,7 @@ DEFAULT_XFILES_FACTOR = 0 # See: http://graphite.readthedocs.io/en/latest/functions.html#function-plugins FUNCTION_PLUGINS = [] + ##################################### # Additional Django Settings # ##################################### diff --git a/webapp/graphite/settings.py b/webapp/graphite/settings.py index 427079f221..c1e6e0ba55 100644 --- a/webapp/graphite/settings.py +++ b/webapp/graphite/settings.py @@ -216,11 +216,6 @@ if not GRAPHITE_WEB_APP_SETTINGS_LOADED: from graphite.app_settings import * # noqa - -STATICFILES_DIRS = ( - join(WEB_DIR, 'static'), -) - # 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