From 496bdb525f67bf87abe78f31178810e0d8e91d75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Mon, 27 May 2019 10:19:32 +0200 Subject: [PATCH] general: stop supporting django 1.8 (#33423) --- Jenkinsfile | 2 +- combo/apps/maps/forms.py | 21 ++------------------- combo/profile/utils.py | 7 +------ combo/utils/forms.py | 7 +------ debian/control | 2 +- setup.py | 2 +- tox.ini | 13 ++++++------- 7 files changed, 13 insertions(+), 41 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ce6b5e86..f9c46755 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -24,7 +24,7 @@ pipeline { steps { script { if (env.JOB_NAME == 'combo' && env.GIT_BRANCH == 'origin/master') { - sh 'sudo -H -u eobuilder /usr/local/bin/eobuilder combo' + sh 'sudo -H -u eobuilder /usr/local/bin/eobuilder -d stretch combo' } } } diff --git a/combo/apps/maps/forms.py b/combo/apps/maps/forms.py index 908adaa5..75d2539f 100644 --- a/combo/apps/maps/forms.py +++ b/combo/apps/maps/forms.py @@ -14,7 +14,6 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -import django from django import forms from django.utils.encoding import force_text from django.utils.text import slugify @@ -22,24 +21,8 @@ from django.utils.text import slugify from .models import MapLayer -if django.VERSION < (1, 11, 0): - class RadioChoiceInput(forms.widgets.RadioChoiceInput): - def render(self, name=None, value=None, *args, **kwargs): - value = super(RadioChoiceInput, self).render(name=name, value=value, *args, **kwargs) - return u'%s' % (self.choice_value, value) - - - class RadioFieldRenderer(forms.widgets.RadioFieldRenderer): - choice_input_class = RadioChoiceInput - - - class IconRadioSelect(forms.RadioSelect): - renderer = RadioFieldRenderer - -else: - - class IconRadioSelect(forms.RadioSelect): - option_template_name = 'maps/icon_radio_option.html' +class IconRadioSelect(forms.RadioSelect): + option_template_name = 'maps/icon_radio_option.html' class MapNewLayerForm(forms.ModelForm): diff --git a/combo/profile/utils.py b/combo/profile/utils.py index 357cccfb..22cb55e2 100644 --- a/combo/profile/utils.py +++ b/combo/profile/utils.py @@ -16,12 +16,7 @@ from django.conf import settings from django.contrib.auth.models import User - -import django -if django.VERSION < (1, 11, 0): - CallableFalse, CallableTrue = False, True -else: - from django.utils.deprecation import CallableFalse, CallableTrue +from django.utils.deprecation import CallableFalse, CallableTrue if 'mellon' in settings.INSTALLED_APPS: from mellon.models import UserSAMLIdentifier diff --git a/combo/utils/forms.py b/combo/utils/forms.py index 33398fb2..c1d12b54 100644 --- a/combo/utils/forms.py +++ b/combo/utils/forms.py @@ -14,7 +14,6 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -import django from django import forms from django.utils.datastructures import MultiValueDict from django.utils.safestring import mark_safe @@ -41,11 +40,7 @@ class MultiSortWidget(forms.SelectMultiple): self.choices.insert(0, option_tuple) # render the