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
478c8d72
Commit
478c8d72
authored
Dec 14, 2014
by
José Padilla
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update docs
parent
3f85b476
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
docs/api-guide/exceptions.md
+2
-2
docs/api-guide/settings.md
+1
-1
No files found.
docs/api-guide/exceptions.md
View file @
478c8d72
...
@@ -51,10 +51,10 @@ In order to alter the style of the response, you could write the following custo
...
@@ -51,10 +51,10 @@ In order to alter the style of the response, you could write the following custo
from rest_framework.views import exception_handler
from rest_framework.views import exception_handler
def custom_exception_handler(exc):
def custom_exception_handler(exc
, context
):
# Call REST framework's default exception handler first,
# Call REST framework's default exception handler first,
# to get the standard error response.
# to get the standard error response.
response = exception_handler(exc)
response = exception_handler(exc
, context
)
# Now add the HTTP status code to the response.
# Now add the HTTP status code to the response.
if response is not None:
if response is not None:
...
...
docs/api-guide/settings.md
View file @
478c8d72
...
@@ -393,7 +393,7 @@ This setting can be changed to support error responses other than the default `{
...
@@ -393,7 +393,7 @@ This setting can be changed to support error responses other than the default `{
This should be a function with the following signature:
This should be a function with the following signature:
exception_handler(exc)
exception_handler(exc
, context
)
*
`exc`
: The exception.
*
`exc`
: The exception.
...
...
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