Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
django-rest-framework
Commits
983400dd
Commit
983400dd
authored
Jul 29, 2014
by
Xavier Ordoquy
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1720 from tomchristie/feature/django_guardian_cleanup
Django & Django guardian updates
parents
c7a988eb
5e02f015
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
22 deletions
+24
-22
.travis.yml
+4
-6
rest_framework/response.py
+4
-0
tox.ini
+16
-16
No files found.
.travis.yml
View file @
983400dd
...
...
@@ -8,7 +8,7 @@ python:
-
"
3.4"
env
:
-
DJANGO="https://www.djangoproject.com/download/1.7
.b4
/tarball/"
-
DJANGO="https://www.djangoproject.com/download/1.7
c2
/tarball/"
-
DJANGO="django==1.6.5"
-
DJANGO="django==1.5.8"
-
DJANGO="django==1.4.13"
...
...
@@ -16,15 +16,13 @@ env:
install
:
-
pip install $DJANGO
-
pip install defusedxml==0.3 Pillow==2.3.0
-
pip install defusedxml==0.3 Pillow==2.3.0
django-guardian==1.2.3
-
"
if
[[
${TRAVIS_PYTHON_VERSION::1}
!=
'3'
]];
then
pip
install
oauth2==1.5.211;
fi"
-
"
if
[[
${TRAVIS_PYTHON_VERSION::1}
!=
'3'
]];
then
pip
install
django-oauth-plus==2.2.4;
fi"
-
"
if
[[
${TRAVIS_PYTHON_VERSION::1}
!=
'3'
]];
then
pip
install
django-oauth2-provider==0.2.4;
fi"
-
"
if
[[
${TRAVIS_PYTHON_VERSION::1}
!=
'3'
]];
then
pip
install
django-guardian==1.1.1;
fi"
-
"
if
[[
${DJANGO::11}
==
'django==1.3'
]];
then
pip
install
django-filter==0.5.4;
fi"
-
"
if
[[
${DJANGO::11}
!=
'django==1.3'
]];
then
pip
install
django-filter==0.7;
fi"
-
"
if
[[
${TRAVIS_PYTHON_VERSION::1}
==
'3'
]];
then
pip
install
-e
git+https://github.com/linovia/django-guardian.git@feature/django_1_7#egg=django-guardian-1.2.0;
fi"
-
"
if
[[
${DJANGO}
==
'https://www.djangoproject.com/download/1.7.b4/tarball/'
]];
then
pip
install
-e
git+https://github.com/linovia/django-guardian.git@feature/django_1_7#egg=django-guardian-1.2.0;
fi"
-
"
if
[[
${DJANGO}
==
'https://www.djangoproject.com/download/1.7c2/tarball/'
]];
then
pip
install
-e
git+https://github.com/linovia/django-guardian.git@feature/django_1_7#egg=django-guardian-1.2.0;
fi"
-
export PYTHONPATH=.
script
:
...
...
@@ -33,7 +31,7 @@ script:
matrix
:
exclude
:
-
python
:
"
2.6"
env
:
DJANGO="https://www.djangoproject.com/download/1.7
.b4
/tarball/"
env
:
DJANGO="https://www.djangoproject.com/download/1.7
c2
/tarball/"
-
python
:
"
3.2"
env
:
DJANGO="django==1.4.13"
-
python
:
"
3.2"
...
...
rest_framework/response.py
View file @
983400dd
...
...
@@ -5,6 +5,7 @@ it is initialized with unrendered data, instead of a pre-rendered string.
The appropriate renderer is called during Django's template response rendering.
"""
from
__future__
import
unicode_literals
import
django
from
django.core.handlers.wsgi
import
STATUS_CODE_TEXT
from
django.template.response
import
SimpleTemplateResponse
from
rest_framework.compat
import
six
...
...
@@ -15,6 +16,9 @@ class Response(SimpleTemplateResponse):
An HttpResponse that allows its data to be rendered into
arbitrary media types.
"""
# TODO: remove that once Django 1.3 isn't supported
if
django
.
VERSION
>=
(
1
,
4
):
rendering_attrs
=
SimpleTemplateResponse
.
rendering_attrs
+
[
'_closable_objects'
]
def
__init__
(
self
,
data
=
None
,
status
=
200
,
template_name
=
None
,
headers
=
None
,
...
...
tox.ini
View file @
983400dd
...
...
@@ -12,34 +12,34 @@ commands = {envpython} rest_framework/runtests/runtests.py
[testenv:py3.4-django1.7]
basepython
=
python3.4
deps
=
https://www.djangoproject.com/download/1.7
b
2/tarball/
deps
=
https://www.djangoproject.com/download/1.7
c
2/tarball/
django-filter
=
=0.7
defusedxml
=
=0.3
Pillow
=
=2.3.0
[testenv:py3.3-django1.7]
basepython
=
python3.3
deps
=
https://www.djangoproject.com/download/1.7
b
2/tarball/
deps
=
https://www.djangoproject.com/download/1.7
c
2/tarball/
django-filter
=
=0.7
defusedxml
=
=0.3
Pillow
=
=2.3.0
[testenv:py3.2-django1.7]
basepython
=
python3.2
deps
=
https://www.djangoproject.com/download/1.7
b
2/tarball/
deps
=
https://www.djangoproject.com/download/1.7
c
2/tarball/
django-filter
=
=0.7
defusedxml
=
=0.3
Pillow
=
=2.3.0
[testenv:py2.7-django1.7]
basepython
=
python2.7
deps
=
https://www.djangoproject.com/download/1.7
b
2/tarball/
deps
=
https://www.djangoproject.com/download/1.7
c
2/tarball/
django-filter
=
=0.7
defusedxml
=
=0.3
django-oauth-plus
=
=2.2.1
oauth2
=
=1.5.211
django-oauth2-provider
=
=0.2.4
django-guardian
=
=1.
1.1
#
django-oauth-plus==2.2.1
#
oauth2==1.5.211
#
django-oauth2-provider==0.2.4
django-guardian
=
=1.
2.3
Pillow
=
=2.3.0
[testenv:py3.4-django1.6]
...
...
@@ -71,7 +71,7 @@ deps = Django==1.6.3
django-oauth-plus
=
=2.2.1
oauth2
=
=1.5.211
django-oauth2-provider
=
=0.2.4
django-guardian
=
=1.
1.1
django-guardian
=
=1.
2.3
Pillow
=
=2.3.0
[testenv:py2.6-django1.6]
...
...
@@ -82,7 +82,7 @@ deps = Django==1.6.3
django-oauth-plus
=
=2.2.1
oauth2
=
=1.5.211
django-oauth2-provider
=
=0.2.4
django-guardian
=
=1.
1.1
django-guardian
=
=1.
2.3
Pillow
=
=2.3.0
[testenv:py3.4-django1.5]
...
...
@@ -114,7 +114,7 @@ deps = django==1.5.6
django-oauth-plus
=
=2.2.1
oauth2
=
=1.5.211
django-oauth2-provider
=
=0.2.3
django-guardian
=
=1.
1.1
django-guardian
=
=1.
2.3
Pillow
=
=2.3.0
[testenv:py2.6-django1.5]
...
...
@@ -125,7 +125,7 @@ deps = django==1.5.6
django-oauth-plus
=
=2.2.1
oauth2
=
=1.5.211
django-oauth2-provider
=
=0.2.3
django-guardian
=
=1.
1.1
django-guardian
=
=1.
2.3
Pillow
=
=2.3.0
[testenv:py2.7-django1.4]
...
...
@@ -136,7 +136,7 @@ deps = django==1.4.11
django-oauth-plus
=
=2.2.1
oauth2
=
=1.5.211
django-oauth2-provider
=
=0.2.3
django-guardian
=
=1.
1.1
django-guardian
=
=1.
2.3
Pillow
=
=2.3.0
[testenv:py2.6-django1.4]
...
...
@@ -147,7 +147,7 @@ deps = django==1.4.11
django-oauth-plus
=
=2.2.1
oauth2
=
=1.5.211
django-oauth2-provider
=
=0.2.3
django-guardian
=
=1.
1.1
django-guardian
=
=1.
2.3
Pillow
=
=2.3.0
[testenv:py2.7-django1.3]
...
...
@@ -158,7 +158,7 @@ deps = django==1.3.5
django-oauth-plus
=
=2.2.1
oauth2
=
=1.5.211
django-oauth2-provider
=
=0.2.3
django-guardian
=
=1.
1.1
django-guardian
=
=1.
2.3
Pillow
=
=2.3.0
[testenv:py2.6-django1.3]
...
...
@@ -169,5 +169,5 @@ deps = django==1.3.5
django-oauth-plus
=
=2.2.1
oauth2
=
=1.5.211
django-oauth2-provider
=
=0.2.3
django-guardian
=
=1.
1.1
django-guardian
=
=1.
2.3
Pillow
=
=2.3.0
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment