61827ccfbd
This commit conditionally allows the os_horizon role to install build and deploy within a venv. This is the new default behavior of the role however the functionality can be disabled. Change-Id: I136eed8bd40f4ae5bc77f3fa925e4cbc6f842271 Implements: blueprint enable-venv-support-within-the-roles Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
22 lines
599 B
Django/Jinja
22 lines
599 B
Django/Jinja
import logging
|
|
import os
|
|
|
|
{% if horizon_venv_enabled | bool %}
|
|
|
|
activate_this = os.path.expanduser("{{ horizon_venv_bin }}/activate_this.py")
|
|
execfile(activate_this, dict(__file__=activate_this))
|
|
|
|
{% endif %}
|
|
|
|
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.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() |