Browse Source

Merge pull request #8 from WadeBarnes/master

EDIVORCE-59 - Fix session cookie issue.
pull/160/head
Wade Barnes 7 years ago
committed by GitHub
parent
commit
5af2088f5d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 5 deletions
  1. +1
    -1
      edivorce/settings/local.py
  2. +1
    -1
      edivorce/settings/openshift.py
  3. +11
    -3
      wsgi.py

+ 1
- 1
edivorce/settings/local.py View File

@ -13,7 +13,7 @@ DATABASES = {
DEBUG = True
CSRF_COOKIE_AGE = None
SESSION_COOKIE_AGE = None
SESSION_COOKIE_AGE = 3600
TEMPLATES[0]["OPTIONS"]["debug"] = True
WEASYPRINT_URL = 'http://localhost:5005'


+ 1
- 1
edivorce/settings/openshift.py View File

@ -54,7 +54,7 @@ if DEPLOYMENT_TYPE == 'dev':
PROXY_URL_PREFIX = os.getenv('PROXY_URL_PREFIX', '/divorce-dev')
DEBUG = True
CSRF_COOKIE_AGE = None
SESSION_COOKIE_AGE = None
SESSION_COOKIE_AGE = 3600
REGISTER_URL = 'https://www.test.bceid.ca/directories/bluepages/details.aspx?serviceID=5522'
if DEPLOYMENT_TYPE == 'test':


+ 11
- 3
wsgi.py View File

@ -8,9 +8,10 @@ https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/
"""
import os
import platform
from django.core.wsgi import get_wsgi_application
from django.core.management import execute_from_command_line
# check if the app is running on OpenShift
if not os.environ.get('OPENSHIFT_BUILD_NAMESPACE', False):
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "edivorce.settings.local")
@ -23,7 +24,14 @@ else:
os.environ["POD_INIT_COMPLETE"] = "True"
# 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'])
question_fixture_path = '/opt/app-root/src/edivorce/fixtures/Question.json'
platform_name = platform.system()
if platform_name == "Windows":
question_fixture_path = os.path.realpath("./edivorce/fixtures/Question.json")
# load the Question fixture
execute_from_command_line(['manage.py', 'loaddata', question_fixture_path])
application = get_wsgi_application()

Loading…
Cancel
Save