From bdca33d55fb6a342d0e9d4ab2ec9c908195445f4 Mon Sep 17 00:00:00 2001 From: Thomas Goirand Date: Thu, 21 Jul 2016 11:30:28 +0000 Subject: [PATCH] Better django-1.10-horizon.test.settings.patch Rewritten-From: 381de12b2bc6c7a53c30d8166647495cb0fbc2b4 --- xenial/debian/changelog | 2 +- .../django-1.10-define-TEMPLATES.patch | 18 ------- .../django-1.10-horizon.test.settings.patch | 52 +++++++++++++++++++ xenial/debian/patches/series | 2 +- 4 files changed, 54 insertions(+), 20 deletions(-) delete mode 100644 xenial/debian/patches/django-1.10-define-TEMPLATES.patch create mode 100644 xenial/debian/patches/django-1.10-horizon.test.settings.patch diff --git a/xenial/debian/changelog b/xenial/debian/changelog index d90f5bc..cbe79c9 100644 --- a/xenial/debian/changelog +++ b/xenial/debian/changelog @@ -2,9 +2,9 @@ horizon (3:10.0.0~b2-2) UNRELEASED; urgency=medium * Add Django 1.10 patch: - django-1.10-django.conf.urls.patterns-removed.patch - - django-1.10-define-TEMPLATES.patch - django-1.10-fix-wrong-django.conf.urls.url-call.patch - django-1.10-fixes-get-form-uses-kwargs.patch + - django-1.10-horizon.test.settings.patch - django-1.10-openstack_dashboard.test.settings.patch -- Thomas Goirand Wed, 20 Jul 2016 10:49:45 +0200 diff --git a/xenial/debian/patches/django-1.10-define-TEMPLATES.patch b/xenial/debian/patches/django-1.10-define-TEMPLATES.patch deleted file mode 100644 index bc9389e..0000000 --- a/xenial/debian/patches/django-1.10-define-TEMPLATES.patch +++ /dev/null @@ -1,18 +0,0 @@ -Description: [Django 1.10] Defines TEMPLATES -Author: Thomas Goirand -Forwarded: no -Last-Update: 2016-07-20 - ---- horizon-10.0.0~b2.orig/horizon/test/settings.py -+++ horizon-10.0.0~b2/horizon/test/settings.py -@@ -170,3 +170,10 @@ LOGGING = { - } - } - } -+ -+TEMPLATES = [ -+ { -+ 'BACKEND': 'django.template.backends.django.DjangoTemplates', -+ 'APP_DIRS': True, -+ }, -+] diff --git a/xenial/debian/patches/django-1.10-horizon.test.settings.patch b/xenial/debian/patches/django-1.10-horizon.test.settings.patch new file mode 100644 index 0000000..2f048cb --- /dev/null +++ b/xenial/debian/patches/django-1.10-horizon.test.settings.patch @@ -0,0 +1,52 @@ +Description: [Django 1.10] Defines TEMPLATES +Author: Thomas Goirand +Forwarded: no +Last-Update: 2016-07-21 + +--- horizon-10.0.0~b2.orig/horizon/test/settings.py ++++ horizon-10.0.0~b2/horizon/test/settings.py +@@ -76,11 +76,11 @@ MIDDLEWARE_CLASSES = ( + ) + + TEMPLATE_CONTEXT_PROCESSORS = ( +- 'django.core.context_processors.debug', +- 'django.core.context_processors.i18n', +- 'django.core.context_processors.request', +- 'django.core.context_processors.media', +- 'django.core.context_processors.static', ++ 'django.template.context_processors.debug', ++ 'django.template.context_processors.i18n', ++ 'django.template.context_processors.request', ++ 'django.template.context_processors.media', ++ 'django.template.context_processors.static', + 'django.contrib.messages.context_processors.messages', + 'horizon.context_processors.horizon') + +@@ -170,3 +170,27 @@ LOGGING = { + } + } + } ++ ++TEMPLATES = [ ++ { ++ 'BACKEND': 'django.template.backends.django.DjangoTemplates', ++ 'APP_DIRS': True, ++ 'DIRS': [ os.path.join( os.path.dirname(os.path.abspath(__file__)), 'tests', 'templates'), ], ++ 'OPTIONS': { ++ 'context_processors': [ ++ 'django.template.context_processors.debug', ++ 'django.template.context_processors.i18n', ++ 'django.template.context_processors.request', ++ 'django.template.context_processors.media', ++ 'django.template.context_processors.static', ++ 'django.contrib.messages.context_processors.messages', ++ 'horizon.context_processors.horizon' ++ ], ++ }, ++ 'loaders': [ ++ 'django.template.loaders.filesystem.Loader', ++ 'django.template.loaders.app_directories.Loader', ++ 'horizon.loaders.TemplateLoader' ++ ], ++ }, ++] diff --git a/xenial/debian/patches/series b/xenial/debian/patches/series index a7995f7..acb9982 100644 --- a/xenial/debian/patches/series +++ b/xenial/debian/patches/series @@ -4,6 +4,6 @@ fixed-horizon-MANIFEST.in.patch BaseCommand.option_list-is-gone-from-django1.10.patch django-1.10-django.conf.urls.patterns-removed.patch django-1.10-fix-wrong-django.conf.urls.url-call.patch -django-1.10-define-TEMPLATES.patch django-1.10-fixes-get-form-uses-kwargs.patch django-1.10-openstack_dashboard.test.settings.patch +django-1.10-horizon.test.settings.patch -- 2.45.2