diff --git a/.travis.yml b/.travis.yml index 697a35c..731afc8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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" diff --git a/example/app/urls.py b/example/app/urls.py index c675e2a..556968d 100644 --- a/example/app/urls.py +++ b/example/app/urls.py @@ -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'), + ] diff --git a/example/example/urls.py b/example/example/urls.py index 77c7f6a..7d726df 100644 --- a/example/example/urls.py +++ b/example/example/urls.py @@ -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 = {