diff options
| author | Tom Christie | 2014-09-11 21:48:54 +0100 |
|---|---|---|
| committer | Tom Christie | 2014-09-11 21:48:54 +0100 |
| commit | 040bfcc09c851bb3dadd60558c78a1f7937e9fbd (patch) | |
| tree | 4af85b2ee317528a080422e5893cc01fae079dcb /rest_framework/utils | |
| parent | a7518719917c7ad8e699119b442cfeb568ba1dde (diff) | |
| download | django-rest-framework-040bfcc09c851bb3dadd60558c78a1f7937e9fbd.tar.bz2 | |
NotImplemented stubs for Field, and DecimalField improvements
Diffstat (limited to 'rest_framework/utils')
| -rw-r--r-- | rest_framework/utils/encoders.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rest_framework/utils/encoders.py b/rest_framework/utils/encoders.py index 6a2f6126..7992b6b1 100644 --- a/rest_framework/utils/encoders.py +++ b/rest_framework/utils/encoders.py @@ -43,7 +43,7 @@ class JSONEncoder(json.JSONEncoder): elif isinstance(o, datetime.timedelta): return str(o.total_seconds()) elif isinstance(o, decimal.Decimal): - return str(o) + return float(o) elif isinstance(o, QuerySet): return list(o) elif hasattr(o, 'tolist'): |
