Skip to content

Commit

Permalink
Started Django 1.11 support #187 (#197)
Browse files Browse the repository at this point in the history
* Added Django 1.11 to tox

* Stripped " from ETag for Django 1.11

* Added Travis configs for Django 1.11

* Limited Django 1.11 tox to not include Django 2.0
  • Loading branch information
MightySCollins authored and auvipy committed Sep 11, 2017
1 parent 97490d4 commit bfe1826
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ python:
- "2.7"

env:
- TOX_ENV=django.1.11
- TOX_ENV=django.1.10
- TOX_ENV=django.1.9
- TOX_ENV=django.1.8.lts
Expand Down
1 change: 1 addition & 0 deletions rest_framework_extensions/etag/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ def calculate_etag(self,

def is_if_none_match_failed(self, res_etag, etags, if_none_match):
if res_etag and if_none_match:
etags = [etag.strip('"') for etag in etags]
return res_etag in etags or '*' in etags
else:
return False
Expand Down
9 changes: 9 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[tox]
envlist =
django.1.11
django.1.10
django.1.9
django.1.8.lts
Expand Down Expand Up @@ -29,6 +30,14 @@ deps=
django-guardian==1.4.4


[testenv:django.1.11]
deps=
{[testenv]deps}
Django>=1.11,<2.0
djangorestframework>=3.3.3
django-guardian==1.4.4


[testenv:django.1.10]
deps=
{[testenv]deps}
Expand Down

0 comments on commit bfe1826

Please sign in to comment.