From 3cfd161afe0075bb3f9eeb7c9d852c2033287fad Mon Sep 17 00:00:00 2001 From: Thomas Goirand Date: Wed, 20 Jul 2016 11:33:59 +0200 Subject: [PATCH] Add django-1.10-get_form-form_class-default-value.patch Rewritten-From: baf12cb05abdf68c6bbaa3647ba5b9dcff2cfe7a --- xenial/debian/changelog | 1 + ....10-get_form-form_class-default-value.patch | 18 ++++++++++++++++++ xenial/debian/patches/series | 1 + 3 files changed, 20 insertions(+) create mode 100644 xenial/debian/patches/django-1.10-get_form-form_class-default-value.patch diff --git a/xenial/debian/changelog b/xenial/debian/changelog index be35a6c..3f66583 100644 --- a/xenial/debian/changelog +++ b/xenial/debian/changelog @@ -2,6 +2,7 @@ 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-get_form-form_class-default-value.patch -- Thomas Goirand Wed, 20 Jul 2016 10:49:45 +0200 diff --git a/xenial/debian/patches/django-1.10-get_form-form_class-default-value.patch b/xenial/debian/patches/django-1.10-get_form-form_class-default-value.patch new file mode 100644 index 0000000..0427ca7 --- /dev/null +++ b/xenial/debian/patches/django-1.10-get_form-form_class-default-value.patch @@ -0,0 +1,18 @@ +Description: [Django 1.10] get_form() form_class default value + The backwards compatibility shim to allow FormMixin.get_form() to be defined + with no default value for its form_class argument is removed. +Author: Thomas Goirand +Forwarded: no +Last-Update: 2016-07-20 + +--- horizon-10.0.0~b2.orig/horizon/forms/views.py ++++ horizon-10.0.0~b2/horizon/forms/views.py +@@ -165,7 +165,7 @@ class ModalFormView(ModalFormMixin, view + """ + return obj.name + +- def get_form(self, form_class): ++ def get_form(self, form_class=None): + """Returns an instance of the form to be used in this view.""" + return form_class(self.request, **self.get_form_kwargs()) + diff --git a/xenial/debian/patches/series b/xenial/debian/patches/series index a78e9b5..e6eb47b 100644 --- a/xenial/debian/patches/series +++ b/xenial/debian/patches/series @@ -3,3 +3,4 @@ fix-dashboard-manage.patch 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-get_form-form_class-default-value.patch -- 2.45.2