debian: move "stable" settings to debian_config.py (#20955)

This commit is contained in:
Frédéric Péters 2018-01-02 17:37:17 +01:00
parent bc4cb0ae9d
commit eb7d39a3b1
2 changed files with 25 additions and 24 deletions

View File

@ -9,6 +9,31 @@ PROJECT_NAME = 'wcs'
#
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',
}
}
#
# local settings
#

24
debian/settings.py vendored
View File

@ -13,7 +13,6 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
TEMPLATE_DEBUG = False
#ADMINS = (
# # ('User 1', 'watchdog@example.net'),
@ -54,28 +53,5 @@ TIME_ZONE = 'Europe/Paris'
# CSRF_COOKIE_SECURE = True
# SESSION_COOKIE_SECURE = True
TEMPLATE_CONTEXT_PROCESSORS = ('django.core.context_processors.request',
'hobo.context_processors.template_vars',
'hobo.context_processors.theme_base') + TEMPLATE_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',
}
}
WCS_LEGACY_CONFIG_FILE = '/etc/wcs/wcs.cfg'
WCS_EXTRA_MODULES = []