general: stop supporting django 1.8 (#33423)
This commit is contained in:
parent
1f5bc01627
commit
496bdb525f
|
@ -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'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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'<span class="icon-%s">%s</span>' % (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):
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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 <select multiple>
|
||||
if django.VERSION < (1, 11, 0):
|
||||
rendered = super(MultiSortWidget, self).render(name, value,
|
||||
attrs=attrs, choices=choices)
|
||||
else:
|
||||
rendered = super(MultiSortWidget, self).render(name, value,
|
||||
rendered = super(MultiSortWidget, self).render(name, value,
|
||||
attrs=attrs)
|
||||
|
||||
# include it in a <div> that will be turned into an appropriate widget
|
||||
|
|
|
@ -9,7 +9,7 @@ X-Python-Version: >= 2.7
|
|||
Package: python-combo
|
||||
Architecture: all
|
||||
Depends: ${misc:Depends}, ${python:Depends},
|
||||
python-django (>= 1.8),
|
||||
python-django (>= 1:1.11),
|
||||
python-djangorestframework (>= 3.3),
|
||||
python-gadjo (>= 0.53),
|
||||
python-pyproj,
|
||||
|
|
2
setup.py
2
setup.py
|
@ -146,7 +146,7 @@ setup(
|
|||
'Programming Language :: Python :: 2',
|
||||
'Programming Language :: Python :: 3',
|
||||
],
|
||||
install_requires=['django>=1.8, <1.12',
|
||||
install_requires=['django>=1.11, <1.12',
|
||||
'django-ckeditor<=4.5.3',
|
||||
'gadjo>=0.53',
|
||||
'feedparser',
|
||||
|
|
13
tox.ini
13
tox.ini
|
@ -1,6 +1,6 @@
|
|||
[tox]
|
||||
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/combo/{env:BRANCH_NAME:}
|
||||
envlist = py2-django18,coverage-py2-django111-pylint,py3-django111
|
||||
envlist = coverage-py2-pylint,py3
|
||||
|
||||
[testenv]
|
||||
usedevelop = True
|
||||
|
@ -9,10 +9,10 @@ setenv =
|
|||
py2: WCSCTL=wcs/wcsctl.py
|
||||
DJANGO_SETTINGS_MODULE=combo.settings
|
||||
COMBO_SETTINGS_FILE=tests/settings.py
|
||||
coverage: COVERAGE=--cov-report xml --cov-report html --cov=combo/
|
||||
deps =
|
||||
django18: django>=1.8,<1.9
|
||||
django111: django>=1.11,<1.12
|
||||
django111: pywebpush
|
||||
django>=1.11,<1.12
|
||||
pywebpush
|
||||
pytest-cov
|
||||
pytest-django
|
||||
pytest-freezegun
|
||||
|
@ -32,6 +32,5 @@ commands =
|
|||
./getlasso.sh
|
||||
python manage.py compilemessages
|
||||
./get_wcs.sh
|
||||
django18: py.test {posargs: --junitxml=test_{envname}_results.xml --cov-report xml --cov-report html --cov=combo/ tests/}
|
||||
django18: ./pylint.sh combo/
|
||||
django111: py.test {posargs: --junitxml=test_{envname}_results.xml tests/}
|
||||
py.test {env:COVERAGE:} {posargs: --junitxml=test_{envname}_results.xml tests/}
|
||||
pylint: ./pylint.sh combo/
|
||||
|
|
Loading…
Reference in New Issue