From 1fce9e38f67991763c9b0e3ff240c70f274887b6 Mon Sep 17 00:00:00 2001 From: Martin Mahner Date: Sat, 23 Nov 2013 16:08:11 +0100 Subject: [PATCH] Reorganised settings. Removed Redis cache from base settings. --- dpaste/{settings.py => settings/__init__.py} | 10 --------- dpaste/settings/local.py | 22 +++++++++++++++++++ .../local.py.example} | 0 dpaste/settings/test.py | 22 +++++++++++++++++++ 4 files changed, 44 insertions(+), 10 deletions(-) rename dpaste/{settings.py => settings/__init__.py} (94%) create mode 100644 dpaste/settings/local.py rename dpaste/{settings_local.example.py => settings/local.py.example} (100%) create mode 100644 dpaste/settings/test.py diff --git a/dpaste/settings.py b/dpaste/settings/__init__.py similarity index 94% rename from dpaste/settings.py rename to dpaste/settings/__init__.py index 251acf9..db6fa0a 100644 --- a/dpaste/settings.py +++ b/dpaste/settings/__init__.py @@ -115,16 +115,6 @@ DATABASES = { SESSION_ENGINE = 'django.contrib.sessions.backends.cache' -CACHES = { - "default": { - "BACKEND": "redis_cache.cache.RedisCache", - "LOCATION": "127.0.0.1:6379:1", - "OPTIONS": { - "CLIENT_CLASS": "redis_cache.client.DefaultClient", - } - } -} - #============================================================================== # App specific settings #============================================================================== diff --git a/dpaste/settings/local.py b/dpaste/settings/local.py new file mode 100644 index 0000000..3490c8e --- /dev/null +++ b/dpaste/settings/local.py @@ -0,0 +1,22 @@ +from dpaste.settings import * + +DEBUG = True +TEMPLATE_DEBUG = DEBUG + +ADMINS = ( + ('Martin Mahner', 'martin@mahner.org'), +) +MANAGERS = ADMINS + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.mysql', + 'NAME': 'dpaste', + 'USER': 'root', + 'PASSWORD': '', + } +} + +SECRET_KEY = 'dYWVXop)XYyUT+gqeBpoX]cTDweFJOsNC' + +EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' \ No newline at end of file diff --git a/dpaste/settings_local.example.py b/dpaste/settings/local.py.example similarity index 100% rename from dpaste/settings_local.example.py rename to dpaste/settings/local.py.example diff --git a/dpaste/settings/test.py b/dpaste/settings/test.py new file mode 100644 index 0000000..35729d8 --- /dev/null +++ b/dpaste/settings/test.py @@ -0,0 +1,22 @@ +from dpaste.settings import * + +DEBUG = True +TEMPLATE_DEBUG = DEBUG + +ADMINS = ( + ('Martin Mahner', 'martin@mahner.org'), +) +MANAGERS = ADMINS + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.mysql', + 'NAME': 'dpaste', + 'USER': 'root', + 'PASSWORD': '', + } +} + +SECRET_KEY = 'dYWVXop)XYyUT+gqeBpoX]cTDweFJOsNC' + +EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'