Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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
edx-platform
Commits
9d8d6655
Commit
9d8d6655
authored
Nov 19, 2012
by
Victor Shnayder
Committed by
Victor Shnayder
Nov 30, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add docstring for expect_json decorator
parent
58364384
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
common/djangoapps/util/json_request.py
+5
-0
No files found.
common/djangoapps/util/json_request.py
View file @
9d8d6655
...
...
@@ -4,6 +4,11 @@ import json
def
expect_json
(
view_function
):
"""
View decorator for simplifying handing of requests that expect json. If the request's
CONTENT_TYPE is application/json, parses the json dict from request.body, and updates
request.POST with the contents.
"""
@wraps
(
view_function
)
def
expect_json_with_cloned_request
(
request
,
*
args
,
**
kwargs
):
# cdodge: fix postback errors in CMS. The POST 'content-type' header can include additional information
...
...
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