From 686af384c201148c3aebcfbf18b2527587d70ea4 Mon Sep 17 00:00:00 2001 From: Julie Pichon Date: Thu, 16 Oct 2014 13:46:10 +0100 Subject: [PATCH] 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 --- openstack_dashboard/wsgi/django.wsgi | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/openstack_dashboard/wsgi/django.wsgi b/openstack_dashboard/wsgi/django.wsgi index 1e92a4d20b..1be0e06f2d 100644 --- a/openstack_dashboard/wsgi/django.wsgi +++ b/openstack_dashboard/wsgi/django.wsgi @@ -1,7 +1,7 @@ import logging import os import sys -import django.core.handlers.wsgi +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 @@ -11,5 +11,4 @@ sys.stdout = sys.stderr DEBUG = False -application = django.core.handlers.wsgi.WSGIHandler() - +application = get_wsgi_application()