From 8bcf4594dd1e52e381cbcd95efd46de0c0d917da Mon Sep 17 00:00:00 2001 From: Michael Hiiva Date: Sat, 22 Aug 2020 14:14:21 -0700 Subject: [PATCH 1/2] Removed Old Dev Settings File. --- agagd/agagd/settings/dev.py | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 agagd/agagd/settings/dev.py diff --git a/agagd/agagd/settings/dev.py b/agagd/agagd/settings/dev.py deleted file mode 100644 index 2ab1dea9..00000000 --- a/agagd/agagd/settings/dev.py +++ /dev/null @@ -1,26 +0,0 @@ -from base import * -import getpass - -DEBUG = True -ADMIN_ENABLED = True - -INSTALLED_APPS += ('django.contrib.admin',) - -EMAIL_HOST = 'localhost' -EMAIL_PORT = 1025 - -_password = os.environ.get('MYSQL_PASS', '') - -# Make this unique, and don't share it with anybody. -SECRET_KEY = '#-+^ipw3x)1dq0$v*z0_^tzoxzcwz3s8^x8kd^5s9+9tfwuixv' - -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. - 'NAME': 'agagd', # Or path to database file if using sqlite3. - 'USER': 'root', # Not used with sqlite3. - 'PASSWORD': _password, # Not used with sqlite3. - 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. - 'PORT': '', # Set to empty string for default. Not used with sqlite3. - } -} From cda2066db1f297ddcc054e26bc1ec6865cdd509a Mon Sep 17 00:00:00 2001 From: Michael Hiiva Date: Sat, 22 Aug 2020 14:21:02 -0700 Subject: [PATCH 2/2] Updated and Provided Better Formating for agagd_environ_keys. --- agagd/agagd/wsgi.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/agagd/agagd/wsgi.py b/agagd/agagd/wsgi.py index 5b5a5533..3015cefc 100644 --- a/agagd/agagd/wsgi.py +++ b/agagd/agagd/wsgi.py @@ -22,8 +22,21 @@ # setting points here. from django.core.wsgi import get_wsgi_application +agagd_environ_keys = [ + 'DJANGO_SETTINGS_MODULE', + 'GOOGLE_ANALYTICS_TRACKING_ID', + 'AGAGD_USER', + 'MYSQL_PASS', + 'APP_DB_NAME', + 'DB_HOST', + 'DB_PORT', + 'SECRET_KEY', + 'PROJECT_ROOT', + 'TEMPLATE_DIR' +] + def bootstrap_env(environ, start_response): - for key in ['DJANGO_SETTINGS_MODULE', 'GOOGLE_ANALYTICS_TRACKING_ID', 'AGAGD_USER', 'MYSQL_PASS', 'APP_DB_NAME', 'SECRET_KEY', 'TEMPLATE_DIR']: + for key in agagd_environ_keys: if key in environ: os.environ[key] = environ[key] _application = get_wsgi_application()