Skip to content

Commit

Permalink
patch from jdugan: allow override of Store and TEMPLATE_DIRS
Browse files Browse the repository at this point in the history
  • Loading branch information
cdavis committed Feb 1, 2010
1 parent 01f441c commit b0088e3
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions webapp/graphite/settings.py
Expand Up @@ -75,19 +75,24 @@
DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.

#Default Store configuration and templates
from graphite.storage import Store

LOCAL_STORE = Store(DATA_DIRS)
STORE = Store(DATA_DIRS, remote_hosts=CLUSTER_SERVERS)

TEMPLATE_DIRS = (
join(WEB_DIR, 'templates'),
)


#Pull in overrides from local_settings.py
try:
from graphite.local_settings import *
except ImportError:
print >> sys.stderr, "Could not import graphite.local_settings, using defaults!"


from graphite.storage import Store

LOCAL_STORE = Store(DATA_DIRS)
STORE = Store(DATA_DIRS, remote_hosts=CLUSTER_SERVERS)


#Django settings below, do not touch!
APPEND_SLASH = False
TEMPLATE_DEBUG = DEBUG
Expand Down Expand Up @@ -141,10 +146,6 @@

ROOT_URLCONF = 'graphite.urls'

TEMPLATE_DIRS = (
join(WEB_DIR, 'templates'),
)

INSTALLED_APPS = (
'graphite.metrics',
'graphite.render',
Expand Down

0 comments on commit b0088e3

Please sign in to comment.