-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding support for Django 2.0+, and removing support for Django versions up to 1.8, the oldest supported LTS release. This allows us to replace the now deprecated django-extensions UUIDField with the Django native version, and drop a couple of other hacks. Resolves #84
- Loading branch information
Showing
9 changed files
with
58 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,37 @@ | ||
language: python | ||
# Workaround for Python 3.6 missing | ||
python: "3.6" | ||
cache: pip | ||
# Generate this env list with: | ||
# tox -l | awk '{ print " - TOX_ENV="$0}' | ||
env: | ||
- TOX_ENV=django16-py27 | ||
- TOX_ENV=django16-py33 | ||
- TOX_ENV=django17-py27 | ||
- TOX_ENV=django17-py33 | ||
- TOX_ENV=django17-py34 | ||
- TOX_ENV=django18-py27 | ||
- TOX_ENV=django18-py34 | ||
- TOX_ENV=django18-py35 | ||
- TOX_ENV=django19-py27 | ||
- TOX_ENV=django19-py34 | ||
- TOX_ENV=django19-py35 | ||
- TOX_ENV=django110-py27 | ||
- TOX_ENV=django110-py35 | ||
- TOX_ENV=django111-py27 | ||
- TOX_ENV=django111-py35 | ||
- TOX_ENV=django111-py36 | ||
- TOX_ENV=coveralls-django111-py36 | ||
|
||
matrix: | ||
include: | ||
- python: 2.7 | ||
env: TOX_ENV=django18-py27 | ||
- python: 3.4 | ||
env: TOX_ENV=django18-py34 | ||
- python: 3.5 | ||
env: TOX_ENV=django18-py35 | ||
- python: 2.7 | ||
env: TOX_ENV=django19-py27 | ||
- python: 3.4 | ||
env: TOX_ENV=django19-py34 | ||
- python: 3.5 | ||
env: TOX_ENV=django19-py35 | ||
- python: 2.7 | ||
env: TOX_ENV=django110-py27 | ||
- python: 3.5 | ||
env: TOX_ENV=django110-py35 | ||
- python: 2.7 | ||
env: TOX_ENV=django111-py27 | ||
- python: 3.5 | ||
env: TOX_ENV=django111-py35 | ||
- python: 3.6 | ||
env: TOX_ENV=django111-py36 | ||
- python: 3.5 | ||
env: TOX_ENV=django20-py35 | ||
- python: 3.6 | ||
env: TOX_ENV=django20-py36 | ||
- python: 3.6 | ||
env: TOX_ENV=coveralls-django111-py36 | ||
|
||
install: pip install tox coveralls | ||
script: tox -e $TOX_ENV | ||
after_success: coveralls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,18 @@ | ||
from django.conf import settings | ||
from django.conf.urls import include, url | ||
from django import VERSION | ||
from django.conf.urls import url | ||
from django.contrib import admin | ||
from django.views.static import serve | ||
try: | ||
from django.conf.urls import patterns | ||
except ImportError: | ||
# DJANGO1.6 DJANGO1.7 | ||
# https://docs.djangoproject.com/en/1.8/releases/1.8/#django-conf-urls-patterns | ||
def patterns(__, *urlpatterns): | ||
return urlpatterns | ||
|
||
from example_project.polls.admin import support_admin | ||
|
||
if VERSION[0] == 1 and VERSION[1] <= 8: | ||
from django.conf.urls import include | ||
else: | ||
# DJANGO1.9 | ||
# https://docs.djangoproject.com/en/2.0/releases/1.9/#passing-a-3-tuple-or-an-app-name-to-include | ||
def include(urls): | ||
return urls | ||
|
||
admin.autodiscover() | ||
|
||
urlpatterns = patterns( | ||
'', | ||
urlpatterns = [ | ||
url(r'^admin/', include(admin.site.urls)), | ||
url(r'^support/', include(support_admin.urls)), | ||
# serve media | ||
url(r'^media/(?P<path>.*)$', serve, { | ||
'document_root': settings.MEDIA_ROOT, | ||
}), | ||
) | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
dj-database-url | ||
# Can upgrade once we lose DJANGO1.7 | ||
django-extensions==1.6.7 | ||
django-extensions==2.0.0 | ||
factory-boy | ||
Faker | ||
coverage | ||
mock | ||
uuid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters