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
82056d89
Commit
82056d89
authored
Sep 07, 2012
by
Tom Christie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add coverage to travis config
parent
07323d4c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletions
+4
-1
.travis.yml
+1
-0
djangorestframework/decorators.py
+3
-1
No files found.
.travis.yml
View file @
82056d89
...
@@ -13,6 +13,7 @@ install:
...
@@ -13,6 +13,7 @@ install:
-
pip install $DJANGO
-
pip install $DJANGO
-
pip install -e . --use-mirrors
-
pip install -e . --use-mirrors
-
pip install -r requirements.txt
-
pip install -r requirements.txt
-
pip install coverage==3.5.1 --use-mirrors
script
:
script
:
-
python setup.py test
-
python setup.py test
djangorestframework/decorators.py
View file @
82056d89
...
@@ -6,6 +6,7 @@ from djangorestframework import exceptions
...
@@ -6,6 +6,7 @@ from djangorestframework import exceptions
from
djangorestframework
import
status
from
djangorestframework
import
status
from
djangorestframework.response
import
Response
from
djangorestframework.response
import
Response
from
djangorestframework.request
import
Request
from
djangorestframework.request
import
Request
from
djangorestframework.settings
import
api_settings
def
api_view
(
allowed_methods
):
def
api_view
(
allowed_methods
):
...
@@ -34,7 +35,8 @@ def api_view(allowed_methods):
...
@@ -34,7 +35,8 @@ def api_view(allowed_methods):
if
isinstance
(
response
,
Response
):
if
isinstance
(
response
,
Response
):
response
.
request
=
request
response
.
request
=
request
if
api_settings
.
FORMAT_SUFFIX_KWARG
:
response
.
format
=
kwargs
.
get
(
api_settings
.
FORMAT_SUFFIX_KWARG
,
None
)
return
response
return
response
except
exceptions
.
APIException
as
exc
:
except
exceptions
.
APIException
as
exc
:
...
...
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