From f9e864c9fca56f2568ad78a62c73d1f1911ce347 Mon Sep 17 00:00:00 2001 From: Yves-Gwenael Bourhis Date: Mon, 21 Sep 2015 15:13:06 +0200 Subject: [PATCH] Update WSGI app creation to be compatible with Django 1.7 or greater This resolves the following error when trying to run Horizon if it has been installed via "django-admin make_web_conf --wgi": 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. Closes-Bug: #1497986 Change-Id: I643058bb82f8e0f11b38ce0dd046773e91e053c3 --- openstack_dashboard/management/commands/horizon.wsgi.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openstack_dashboard/management/commands/horizon.wsgi.template b/openstack_dashboard/management/commands/horizon.wsgi.template index 3832a2446f..cc3bb24539 100644 --- a/openstack_dashboard/management/commands/horizon.wsgi.template +++ b/openstack_dashboard/management/commands/horizon.wsgi.template @@ -9,5 +9,5 @@ execfile(activate_this, dict(__file__=activate_this)) sys.path.insert(0, '{{ PROJECT_ROOT }}') os.environ['DJANGO_SETTINGS_MODULE'] = '{{ DJANGO_SETTINGS_MODULE }}' -import django.core.handlers.wsgi -application = django.core.handlers.wsgi.WSGIHandler() +import django.core.wsgi +application = django.core.wsgi.get_wsgi_application()