deb-horizon/openstack_dashboard/wsgi/django.wsgi
Julie Pichon 686af384c2 Update WSGI app creation to be compatible with Django 1.7
This resolves the following error when trying to run Horizon:

AppRegistryNotReady: The translation infrastructure cannot be
initialized before the apps registry is ready. Check that you don't
make non-lazy gettext calls at import time.

and is backwards-compatible with our currently supported versions (back
to 1.4).

Change-Id: I1e59f2bf6633a34cfe9230aa028f345e5fa70f94
Closes-Bug: #1382023
2014-10-16 13:57:45 +01:00

15 lines
415 B
Python

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.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()