[python-django-horizon] Update WSGI app creation for Django 1.7
Matthias Runge
mrunge at fedoraproject.org
Tue Oct 21 07:41:27 UTC 2014
commit fe4ec4ee8e83c796b0878765719d6e80ef8ebd56
Author: Matthias Runge <mrunge at redhat.com>
Date: Mon Oct 20 13:53:43 2014 +0200
Update WSGI app creation for Django 1.7
...-app-creation-to-be-compatible-with-Djang.patch | 41 ++++++++++++++++++++
python-django-horizon.spec | 1 +
2 files changed, 42 insertions(+), 0 deletions(-)
---
diff --git a/0019-Update-WSGI-app-creation-to-be-compatible-with-Djang.patch b/0019-Update-WSGI-app-creation-to-be-compatible-with-Djang.patch
new file mode 100644
index 0000000..0aa6136
--- /dev/null
+++ b/0019-Update-WSGI-app-creation-to-be-compatible-with-Djang.patch
@@ -0,0 +1,41 @@
+From 69490ba9082043f7ccbab95d1b0ca4c3b4182df6 Mon Sep 17 00:00:00 2001
+From: Julie Pichon <jpichon at redhat.com>
+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
+(cherry picked from commit 686af384c201148c3aebcfbf18b2527587d70ea4)
+---
+ 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 1e92a4d..1be0e06 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()
diff --git a/python-django-horizon.spec b/python-django-horizon.spec
index 482480a..5f520b3 100644
--- a/python-django-horizon.spec
+++ b/python-django-horizon.spec
@@ -42,6 +42,7 @@ Patch0015: 0015-Add-dropdown-actions-to-detail-page.patch
Patch0016: 0016-Add-dropdown-actions-to-all-details-pages.patch
Patch0017: 0017-Add-support-for-row-actions-to-detail-pages.patch
Patch0018: 0018-Clean-up-test-output.patch
+Patch0019: 0019-Update-WSGI-app-creation-to-be-compatible-with-Djang.patch
#
# BuildArch needs to be located below patches in the spec file. Don't ask!
More information about the scm-commits
mailing list