openstack-ansible-os_horizon/templates/horizon_django.wsgi.j2
Dmitriy Rabotyagov 9c3c776c7a Switch SESSION_ENGINE to memcached
Previously we were using cached_db session backend by default.
However with django version update, it requires more recent
mysqlclient module which is not part of requirements.
Moreover usage of cached_db makes us to carry and maintain
extra stuff, which can be dropped with memcached backend.

Change-Id: I8df7ee967d8dcbeb09a42fd568f98acc3e88adad
2019-12-18 19:52:38 +02:00

15 lines
433 B
Django/Jinja

import logging
import os
import sys
from django.core.wsgi import get_wsgi_application
from django.conf import settings
# Add this file path to sys.path in order to import settings
sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../..')))
os.environ['DJANGO_SETTINGS_MODULE'] = 'openstack_dashboard.settings'
sys.stdout = sys.stderr
DEBUG = False
application = get_wsgi_application()