Remove python2.6 and 3.3 and fix flake8 errors
This commit is contained in:
parent
b2aad8da31
commit
51f3e11e5b
25
.travis.yml
25
.travis.yml
|
@ -1,9 +1,7 @@
|
|||
language: python
|
||||
|
||||
python:
|
||||
- "2.6"
|
||||
- "2.7"
|
||||
- "3.3"
|
||||
- "3.4"
|
||||
- "3.5"
|
||||
- "3.6"
|
||||
|
@ -21,31 +19,8 @@ env:
|
|||
- DJANGO_VERSION='https://github.com/django/django/archive/master.tar.gz'
|
||||
matrix:
|
||||
exclude:
|
||||
- python: "2.6"
|
||||
env: DJANGO_VERSION='Django>=1.7,<1.8'
|
||||
- python: "2.6"
|
||||
env: DJANGO_VERSION='Django>=1.8,<1.9'
|
||||
- python: "2.6"
|
||||
env: DJANGO_VERSION='Django>=1.9,<1.10'
|
||||
- python: "2.6"
|
||||
env: DJANGO_VERSION='Django>=1.10,<1.11'
|
||||
- python: "2.6"
|
||||
env: DJANGO_VERSION='Django>=1.11,<2.0'
|
||||
- python: "2.6"
|
||||
env: DJANGO_VERSION='https://github.com/django/django/archive/master.tar.gz'
|
||||
- python: "2.7"
|
||||
env: DJANGO_VERSION='https://github.com/django/django/archive/master.tar.gz'
|
||||
- python: "3.3"
|
||||
env: DJANGO_VERSION='Django>=1.4,<1.5'
|
||||
- python: "3.3"
|
||||
env: DJANGO_VERSION='Django>=1.5,<1.6'
|
||||
- python: "3.3"
|
||||
env: DJANGO_VERSION='Django>=1.9,<1.10'
|
||||
- python: "3.3"
|
||||
env: DJANGO_VERSION='Django>=1.10,<1.11'
|
||||
- python: "3.3"
|
||||
env: DJANGO_VERSION='Django>=1.11,<2.0'
|
||||
- python: "3.3"
|
||||
env: DJANGO_VERSION='Django>=2.0,<2.1'
|
||||
- python: "2.7"
|
||||
env: DJANGO_VERSION='Django>=2.1,<2.2'
|
||||
|
|
|
@ -18,12 +18,13 @@ from django import VERSION
|
|||
from django.conf import settings
|
||||
from django.contrib.auth import login
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.http import HttpResponseRedirect
|
||||
|
||||
if VERSION >= (2, 0):
|
||||
from django.urls import reverse
|
||||
else:
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.http import HttpResponseRedirect
|
||||
|
||||
|
||||
|
||||
def app_index(request):
|
||||
|
|
|
@ -16,8 +16,13 @@
|
|||
|
||||
from django import VERSION
|
||||
from django.conf import settings
|
||||
from django.contrib import admin
|
||||
from django.views.static import serve
|
||||
|
||||
|
||||
try:
|
||||
from django.conf.urls import include, url
|
||||
|
||||
# Compatibility for Django > 1.8
|
||||
def patterns(prefix, *args):
|
||||
if VERSION < (1, 9):
|
||||
|
@ -34,8 +39,6 @@ except ImportError: # Django < 1.4
|
|||
from django.conf.urls.defaults import include, patterns, url
|
||||
else:
|
||||
from django.urls import include, url
|
||||
from django.contrib import admin
|
||||
from django.views.static import serve
|
||||
|
||||
|
||||
admin.autodiscover()
|
||||
|
|
128
tox.ini
128
tox.ini
|
@ -1,5 +1,5 @@
|
|||
[tox]
|
||||
envlist = py{26,27,33,34,35,36}-dj{14,15,16,16,17,18,19,110,111},py{34,35,36,37}-dj{14,15,16,16,17,18,19,110,111,20},py{35,36,37}-dj{21,22},
|
||||
envlist = py{27,34,35,36}-dj{14,15,16,16,17,18,19,110,111},py{34,35,36,37}-dj{14,15,16,16,17,18,19,110,111,20},py{35,36,37}-dj{21,22},
|
||||
|
||||
[testenv]
|
||||
usedevelop = True
|
||||
|
@ -12,78 +12,6 @@ commands =
|
|||
install_command =
|
||||
pip install {opts} {packages}
|
||||
|
||||
[testenv:py26-dj14]
|
||||
basepython = python2.6
|
||||
deps =
|
||||
django==1.4.22
|
||||
pillow==1.7.8
|
||||
PyYAML==3.10
|
||||
coveralls==0.3
|
||||
flake8
|
||||
|
||||
[testenv:py26-dj15]
|
||||
basepython = python2.6
|
||||
deps =
|
||||
django==1.5.12
|
||||
pillow==1.7.8
|
||||
PyYAML==3.10
|
||||
coveralls==0.3
|
||||
flake8
|
||||
|
||||
[testenv:py26-dj16]
|
||||
basepython = python2.6
|
||||
deps =
|
||||
django==1.6.11
|
||||
pillow==1.7.8
|
||||
PyYAML==3.10
|
||||
coveralls==0.3
|
||||
flake8
|
||||
|
||||
[testenv:py26-dj17]
|
||||
basepython = python2.6
|
||||
deps =
|
||||
django==1.7.11
|
||||
pillow==1.7.8
|
||||
PyYAML==3.10
|
||||
coveralls==0.3
|
||||
flake8
|
||||
|
||||
[testenv:py26-dj18]
|
||||
basepython = python2.6
|
||||
deps =
|
||||
django==1.8.17
|
||||
pillow==1.7.8
|
||||
PyYAML==3.10
|
||||
coveralls==0.3
|
||||
flake8
|
||||
|
||||
[testenv:py26-dj19]
|
||||
basepython = python2.6
|
||||
deps =
|
||||
django==1.9.12
|
||||
pillow==1.7.8
|
||||
PyYAML==3.10
|
||||
coveralls==0.3
|
||||
flake8
|
||||
|
||||
[testenv:py26-dj110]
|
||||
basepython = python2.6
|
||||
deps =
|
||||
django==1.10.4
|
||||
pillow==1.7.8
|
||||
PyYAML==3.10
|
||||
coveralls==0.3
|
||||
flake8
|
||||
|
||||
[testenv:py26-dj111]
|
||||
basepython = python2.6
|
||||
deps =
|
||||
django==1.11.15
|
||||
pillow==1.7.8
|
||||
PyYAML==3.13
|
||||
coveralls==0.3
|
||||
flake8
|
||||
|
||||
[testenv:py27-dj14]
|
||||
basepython = python2.7
|
||||
deps =
|
||||
|
@ -156,60 +84,6 @@ deps =
|
|||
coveralls==0.3
|
||||
flake8
|
||||
|
||||
[testenv:py33-dj16]
|
||||
basepython = python3.3
|
||||
deps =
|
||||
django==1.6.11
|
||||
pillow==1.7.8
|
||||
PyYAML==3.10
|
||||
coveralls==0.3
|
||||
flake8
|
||||
|
||||
[testenv:py33-dj17]
|
||||
basepython = python3.3
|
||||
deps =
|
||||
django==1.7.11
|
||||
pillow==1.7.8
|
||||
PyYAML==3.10
|
||||
coveralls==0.3
|
||||
flake8
|
||||
|
||||
[testenv:py33-dj18]
|
||||
basepython = python3.3
|
||||
deps =
|
||||
django==1.8.17
|
||||
pillow==1.7.8
|
||||
PyYAML==3.10
|
||||
coveralls==0.3
|
||||
flake8
|
||||
|
||||
[testenv:py33-dj19]
|
||||
basepython = python3.3
|
||||
deps =
|
||||
django==1.9.12
|
||||
pillow==1.7.8
|
||||
PyYAML==3.10
|
||||
coveralls==0.3
|
||||
flake8
|
||||
|
||||
[testenv:py33-dj110]
|
||||
basepython = python3.3
|
||||
deps =
|
||||
django==1.10.4
|
||||
pillow==1.7.8
|
||||
PyYAML==3.10
|
||||
coveralls==0.3
|
||||
flake8
|
||||
|
||||
[testenv:py33-dj111]
|
||||
basepython = python3.3
|
||||
deps =
|
||||
django==1.11.15
|
||||
pillow==1.7.8
|
||||
PyYAML==3.13
|
||||
coveralls==0.3
|
||||
flake8
|
||||
|
||||
[testenv:py34-dj111]
|
||||
basepython = python3.4
|
||||
deps =
|
||||
|
|
Loading…
Reference in a new issue