Fix problem in travis with django/python version (#122)
* Fix travis * Fix url
This commit is contained in:
parent
71f9ae84e6
commit
07a5e442b2
3 changed files with 20 additions and 7 deletions
|
@ -77,6 +77,8 @@ matrix:
|
|||
env: DJANGO_VERSION='Django>=1.9,<1.10'
|
||||
- python: "3.6"
|
||||
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"
|
||||
env: DJANGO_VERSION='Django>=1.4,<1.5'
|
||||
- python: "3.7"
|
||||
|
@ -91,6 +93,8 @@ matrix:
|
|||
env: DJANGO_VERSION='Django>=1.9,<1.10'
|
||||
- python: "3.7"
|
||||
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"
|
||||
env: DJANGO_VERSION='Django>=1.4,<1.5'
|
||||
- python: "3.8"
|
||||
|
|
|
@ -30,12 +30,19 @@ try:
|
|||
else:
|
||||
return list(args)
|
||||
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
|
||||
|
||||
|
||||
urlpatterns = patterns(
|
||||
'',
|
||||
url(r'^$', app_index, name='app_index'),
|
||||
)
|
||||
if VERSION < (1, 11):
|
||||
urlpatterns = patterns(
|
||||
'',
|
||||
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
|
||||
if VERSION < (1, 4):
|
||||
from django.conf.urls.defaults import include, patterns, url
|
||||
else:
|
||||
elif VERSION < (4, 0):
|
||||
from django.urls import include, url
|
||||
else:
|
||||
from django.urls import re_path as url
|
||||
|
||||
|
||||
js_info_dict = {
|
||||
|
|
Loading…
Reference in a new issue