Change delete_item to RESTful URL.

Part of STUD-847.
This commit is contained in:
cahrens
2013-11-01 14:39:23 -04:00
parent b489514096
commit 16766a5ee9
21 changed files with 172 additions and 106 deletions

View File

@@ -17,7 +17,7 @@ def expect_json(view_function):
def parse_json_into_request(request, *args, **kwargs):
# cdodge: fix postback errors in CMS. The POST 'content-type' header can include additional information
# e.g. 'charset', so we can't do a direct string compare
if "application/json" in request.META.get('CONTENT_TYPE', ''):
if "application/json" in request.META.get('CONTENT_TYPE', '') and request.body:
request.json = json.loads(request.body)
else:
request.json = {}