From: Thomas Goirand Date: Mon, 11 Jan 2016 03:42:53 +0000 (+0000) Subject: Added fixed-removed-TemplateDoesNotExist.patch. X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=709a468521050930966bcf09554e3388fbd8fca8;p=openstack-build%2Fhorizon-build.git Added fixed-removed-TemplateDoesNotExist.patch. Rewritten-From: 94f825869aa7a96a406841742712b2d21ff9662d --- diff --git a/trusty/debian/changelog b/trusty/debian/changelog index d2d62e8..50c874b 100644 --- a/trusty/debian/changelog +++ b/trusty/debian/changelog @@ -3,6 +3,7 @@ horizon (2:8.0.0-4) unstable; urgency=medium * Added do-not-use-django.utils.log.NullHandler.patch * Added do-not-use-importlib-from-django.patch. * Added do-not-use-django.utils.unittest.patch. + * Added fixed-removed-TemplateDoesNotExist.patch. -- Thomas Goirand Mon, 11 Jan 2016 02:54:28 +0000 diff --git a/trusty/debian/patches/fixed-removed-TemplateDoesNotExist.patch b/trusty/debian/patches/fixed-removed-TemplateDoesNotExist.patch new file mode 100644 index 0000000..de32b2b --- /dev/null +++ b/trusty/debian/patches/fixed-removed-TemplateDoesNotExist.patch @@ -0,0 +1,22 @@ +Description: Fixed removed TemplateDoesNotExist + This is removed from Django 1.9 +Author: Thomas Goirand +Forwarded: no +Last-Update: 2016-01-11 + +--- horizon-8.0.0.orig/horizon/loaders.py ++++ horizon-8.0.0/horizon/loaders.py +@@ -19,7 +19,12 @@ import os + + import django + from django.conf import settings +-from django.template.base import TemplateDoesNotExist # noqa ++ ++if django.get_version() >= '1.9': ++ class TemplateDoesNotExist(Exception): ++ pass ++else: ++ from django.template.base import TemplateDoesNotExist # noqa + + if django.get_version() >= '1.8': + from django.template.engine import Engine diff --git a/trusty/debian/patches/series b/trusty/debian/patches/series index fc1fc16..4b1c851 100644 --- a/trusty/debian/patches/series +++ b/trusty/debian/patches/series @@ -4,3 +4,4 @@ fixed-horizon-MANIFEST.in.patch do-not-use-importlib-from-django.patch do-not-use-django.utils.log.NullHandler.patch do-not-use-django.utils.unittest.patch +fixed-removed-TemplateDoesNotExist.patch