diff options
| author | Michael Ding | 2011-12-30 22:52:01 +0800 |
|---|---|---|
| committer | Michael Ding | 2011-12-30 22:52:01 +0800 |
| commit | c7b9100f19d7a3701b03cfca6715a9341439b9a8 (patch) | |
| tree | feec6708adc6da03081bd364c940834035664fdf | |
| parent | ff9cb862d1b1c670629b26158c62c2eec90f0a28 (diff) | |
| download | django-rest-framework-c7b9100f19d7a3701b03cfca6715a9341439b9a8.tar.bz2 | |
change the key name "field-errors" to "field_errors".
as "-" is not allowed as a part of key name in javascript
| -rw-r--r-- | djangorestframework/resources.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/djangorestframework/resources.py b/djangorestframework/resources.py index bf9af6f0..68b285b9 100644 --- a/djangorestframework/resources.py +++ b/djangorestframework/resources.py @@ -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) |
