Fix problem in travis with django/python version (#122)
* Fix travis * Fix url
This commit is contained in:
parent
71f9ae84e6
commit
07a5e442b2
|
@ -77,6 +77,8 @@ matrix:
|
||||||
env: DJANGO_VERSION='Django>=1.9,<1.10'
|
env: DJANGO_VERSION='Django>=1.9,<1.10'
|
||||||
- python: "3.6"
|
- python: "3.6"
|
||||||
env: DJANGO_VERSION='Django>=1.10,<1.11'
|
env: DJANGO_VERSION='Django>=1.10,<1.11'
|
||||||
|
- python: "3.6"
|
||||||
|
env: DJANGO_VERSION='https://github.com/django/django/archive/master.tar.gz'
|
||||||
- python: "3.7"
|
- python: "3.7"
|
||||||
env: DJANGO_VERSION='Django>=1.4,<1.5'
|
env: DJANGO_VERSION='Django>=1.4,<1.5'
|
||||||
- python: "3.7"
|
- python: "3.7"
|
||||||
|
@ -91,6 +93,8 @@ matrix:
|
||||||
env: DJANGO_VERSION='Django>=1.9,<1.10'
|
env: DJANGO_VERSION='Django>=1.9,<1.10'
|
||||||
- python: "3.7"
|
- python: "3.7"
|
||||||
env: DJANGO_VERSION='Django>=1.10,<1.11'
|
env: DJANGO_VERSION='Django>=1.10,<1.11'
|
||||||
|
- python: "3.7"
|
||||||
|
env: DJANGO_VERSION='https://github.com/django/django/archive/master.tar.gz'
|
||||||
- python: "3.8"
|
- python: "3.8"
|
||||||
env: DJANGO_VERSION='Django>=1.4,<1.5'
|
env: DJANGO_VERSION='Django>=1.4,<1.5'
|
||||||
- python: "3.8"
|
- python: "3.8"
|
||||||
|
|
|
@ -30,12 +30,19 @@ try:
|
||||||
else:
|
else:
|
||||||
return list(args)
|
return list(args)
|
||||||
except ImportError: # Django < 1.4
|
except ImportError: # Django < 1.4
|
||||||
from django.conf.urls.defaults import patterns, url
|
if VERSION < (4, 0):
|
||||||
|
from django.conf.urls.defaults import patterns, url
|
||||||
|
else:
|
||||||
|
from django.urls import re_path as url
|
||||||
|
|
||||||
from .views import app_index
|
from .views import app_index
|
||||||
|
|
||||||
|
if VERSION < (1, 11):
|
||||||
urlpatterns = patterns(
|
urlpatterns = patterns(
|
||||||
'',
|
'',
|
||||||
url(r'^$', app_index, name='app_index'),
|
url(r'^$', app_index, name='app_index'),
|
||||||
)
|
)
|
||||||
|
else:
|
||||||
|
urlpatterns = [
|
||||||
|
url(r'^$', app_index, name='app_index'),
|
||||||
|
]
|
||||||
|
|
|
@ -36,8 +36,10 @@ try:
|
||||||
except ImportError: # Django < 1.4
|
except ImportError: # Django < 1.4
|
||||||
if VERSION < (1, 4):
|
if VERSION < (1, 4):
|
||||||
from django.conf.urls.defaults import include, patterns, url
|
from django.conf.urls.defaults import include, patterns, url
|
||||||
else:
|
elif VERSION < (4, 0):
|
||||||
from django.urls import include, url
|
from django.urls import include, url
|
||||||
|
else:
|
||||||
|
from django.urls import re_path as url
|
||||||
|
|
||||||
|
|
||||||
js_info_dict = {
|
js_info_dict = {
|
||||||
|
|
Loading…
Reference in a new issue