New registration for C/S API v2. Only ReCAPTCHA working currently.

This commit is contained in:
David Baker 2015-03-30 18:13:10 +01:00
parent 6f4f7e4e22
commit 59bf16eddc
8 changed files with 192 additions and 16 deletions

View file

@ -40,6 +40,12 @@ def client_v2_pattern(path_regex):
return re.compile("^" + CLIENT_V2_ALPHA_PREFIX + path_regex)
def parse_request_allow_empty(request):
content = request.content.read()
if content == None or content == '':
return None
return simplejson.loads(content)
def parse_json_dict_from_request(request):
try:
content = simplejson.loads(request.content.read())