From 1034fbbb5217a6fc47d89b56a910f7c44d9bebd4 Mon Sep 17 00:00:00 2001 From: Jan Dittberner Date: Sat, 31 May 2014 18:00:11 +0200 Subject: [PATCH 1/3] improve production settings --- gvaldap/gvaldap/settings/production.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/gvaldap/gvaldap/settings/production.py b/gvaldap/gvaldap/settings/production.py index 288e1db..e24de0d 100644 --- a/gvaldap/gvaldap/settings/production.py +++ b/gvaldap/gvaldap/settings/production.py @@ -10,7 +10,7 @@ from .base import * ########## HOST CONFIGURATION # See: https://docs.djangoproject.com/en/1.5/releases/1.5/#allowed-hosts-required-in-production -ALLOWED_HOSTS = [] +ALLOWED_HOSTS = get_env_setting('GVALDAP_ALLOWED_HOSTS').split(',') ########## END HOST CONFIGURATION ########## EMAIL CONFIGURATION @@ -18,33 +18,33 @@ ALLOWED_HOSTS = [] EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-host -EMAIL_HOST = environ.get('EMAIL_HOST', 'smtp.gmail.com') +#EMAIL_HOST = environ.get('EMAIL_HOST', 'smtp.gmail.com') # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-host-password -EMAIL_HOST_PASSWORD = environ.get('EMAIL_HOST_PASSWORD', '') +#EMAIL_HOST_PASSWORD = environ.get('EMAIL_HOST_PASSWORD', '') # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-host-user -EMAIL_HOST_USER = environ.get('EMAIL_HOST_USER', 'your_email@example.com') +#EMAIL_HOST_USER = environ.get('EMAIL_HOST_USER', 'your_email@example.com') # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-port -EMAIL_PORT = environ.get('EMAIL_PORT', 587) +#EMAIL_PORT = environ.get('EMAIL_PORT', 587) # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-subject-prefix EMAIL_SUBJECT_PREFIX = '[%s] ' % SITE_NAME # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-use-tls -EMAIL_USE_TLS = True +#EMAIL_USE_TLS = True # See: https://docs.djangoproject.com/en/dev/ref/settings/#server-email -SERVER_EMAIL = EMAIL_HOST_USER +SERVER_EMAIL = get_env_setting('GVALDAP_SERVER_EMAIL') ########## END EMAIL CONFIGURATION ########## DATABASE CONFIGURATION -DATABASES = {} +#DATABASES = {} ########## END DATABASE CONFIGURATION ########## CACHE CONFIGURATION # See: https://docs.djangoproject.com/en/dev/ref/settings/#caches -CACHES = {} +#CACHES = {} ########## END CACHE CONFIGURATION From 2b935c0c03badac7cc47d47a276727badfe6b4d1 Mon Sep 17 00:00:00 2001 From: Jan Dittberner Date: Sat, 31 May 2014 18:05:14 +0200 Subject: [PATCH 2/3] update changelog --- docs/changelog.rst | 4 ++++ docs/conf.py | 3 +++ 2 files changed, 7 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index 2c8c813..bad81d8 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -1,5 +1,9 @@ Changelog ========= +* :support:`-` improve production settings + - no custom cache and database + - get `ALLOWED_HOSTS` and `SERVER_EMAIL` from environment variables + * :release:`0.1 <2014-05-31>` * :feature:`-` intial support for creating LDAP users and groups diff --git a/docs/conf.py b/docs/conf.py index 472a042..fda7743 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -20,6 +20,9 @@ import os # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, os.path.abspath(os.path.join('..', 'gvaldap'))) +os.environ['GVALDAP_ALLOWED_HOSTS'] = 'localhost' +os.environ['GVALDAP_SERVER_EMAIL'] = 'root@localhost' + # -- General configuration ----------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. From 86e8857a7b29a2f35098fff04e52d5cf4263ec4a Mon Sep 17 00:00:00 2001 From: Jan Dittberner Date: Sat, 31 May 2014 18:10:09 +0200 Subject: [PATCH 3/3] add release 0.1.1 to changelog --- docs/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index bad81d8..8c0658d 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -1,6 +1,7 @@ Changelog ========= +* :release:`0.1.1 <2014-05-31>` * :support:`-` improve production settings - no custom cache and database - get `ALLOWED_HOSTS` and `SERVER_EMAIL` from environment variables