# This file is sourced by "execfile" from wcs.settings

import os

PROJECT_NAME = 'wcs'

#
# hobotization
#
execfile('/usr/lib/hobo/debian_config_common.py')

# and some hobo parts that are specific to w.c.s.
TEMPLATES[0]['OPTIONS']['context_processors'] = [
        'hobo.context_processors.template_vars',
        'hobo.context_processors.theme_base',
        ] + TEMPLATES[0]['OPTIONS']['context_processors']

if not 'MIDDLEWARE_CLASSES' in globals():
    MIDDLEWARE_CLASSES = global_settings.MIDDLEWARE_CLASSES

MIDDLEWARE_CLASSES = (
    'hobo.middleware.utils.StoreRequestMiddleware',
    'hobo.middleware.xforwardedfor.XForwardedForMiddleware',
    'hobo.middleware.VersionMiddleware', # /__version__
    'hobo.middleware.cors.CORSMiddleware',
) + MIDDLEWARE_CLASSES

CACHES = {
    'default': {
        'BACKEND': 'wcs.cache.WcsTenantCache',
        # add a real Django cache backend, with its parameters if needed
        'REAL_BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
        'LOCATION': '127.0.0.1:11211',
    }
}

# don't rely on hobo logging as it requires hobo multitenant support.
LOGGING = {}

#
# local settings
#
execfile(os.path.join(ETC_DIR, 'settings.py'))

# run additional settings snippets
execfile('/usr/lib/hobo/debian_config_settings_d.py')
