change the key name "field-errors" to "field_errors".

as "-" is not allowed as a part of key name in javascript
This commit is contained in:
Michael Ding 2011-12-30 22:52:01 +08:00
parent ff9cb862d1
commit c7b9100f19

View File

@ -173,7 +173,7 @@ class FormResource(Resource):
field_errors[key] = [u'This field does not exist.']
if field_errors:
detail[u'field-errors'] = field_errors
detail[u'field_errors'] = field_errors
# Return HTTP 400 response (BAD REQUEST)
raise ErrorResponse(400, detail)