Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] add django 1.9 support and remove the obsolete versions code. #121

Merged
merged 9 commits into from
Mar 30, 2016
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ install:
- pip install tox

env:
- TOX_ENV=django.1.9
- TOX_ENV=django.1.8.lts,
- TOX_ENV=django.1.7

Expand Down
13 changes: 5 additions & 8 deletions rest_framework_extensions/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,13 @@
from django.conf import settings

# Try to import six from Django, fallback to included `six`.
try:
from django.utils import six
except ImportError:
from rest_framework import six
from django.utils import six


# location of patterns, url, include changes in 1.4 onwards
try:
from django.conf.urls import patterns, url, include
except ImportError:
from django.conf.urls.defaults import patterns, url, include

from django.conf.urls import url, include


# Handle django.utils.encoding rename:
# smart_unicode -> smart_text
Expand Down
3 changes: 1 addition & 2 deletions tests_app/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@

import django

if django.VERSION < (1, 3):
INSTALLED_APPS += ('staticfiles',)


TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'

Expand Down
17 changes: 12 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[tox]
envlist =
django.1.9
django.1.8.lts,
django.1.7

Expand All @@ -12,18 +13,24 @@ commands=
{envbindir}/django-admin.py test --settings=settings {posargs}


[testenv:django.1.9]
deps=
{[testenv]deps}
Django==1.9.1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should change this line by "Django>=1.9,<1.10"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @gustavi

djangorestframework==3.3.2
django-guardian==1.4.1


[testenv:django.1.8.lts]
deps=
{[testenv]deps}
Django==1.8.7
djangorestframework==3.3.1
django-guardian==1.3.2
Django==1.8.8
djangorestframework==3.3.2
django-guardian==1.4.1

[testenv:django.1.7]
deps=
{[testenv]deps}
Django==1.7.11
djangorestframework==3.3.1
django-guardian==1.3.2
djangorestframework==3.3.2
django-guardian==1.4.1