From 3ce68b365adf52746f9be47f8bd10e340dda27b9 Mon Sep 17 00:00:00 2001 From: Mike Olund Date: Thu, 9 Mar 2017 12:32:30 -0800 Subject: [PATCH] Automatically load the Question fixture on every deployment --- wsgi.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wsgi.py b/wsgi.py index 925417bd..dc176b36 100644 --- a/wsgi.py +++ b/wsgi.py @@ -16,6 +16,9 @@ if not os.environ.get('OPENSHIFT_BUILD_NAMESPACE', False): os.environ.setdefault("DJANGO_SETTINGS_MODULE", "edivorce.settings.local") else: os.environ.setdefault("DJANGO_SETTINGS_MODULE", "edivorce.settings.openshift") + # compress the static assets execute_from_command_line(['manage.py', 'compress', '--force']) + # load the Question fixture + execute_from_command_line(['manage.py', 'loaddata', '/opt/app-root/src/edivorce/fixtures/Question.json']) application = get_wsgi_application()