aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/utils
diff options
context:
space:
mode:
authorTom Christie2014-09-11 21:48:54 +0100
committerTom Christie2014-09-11 21:48:54 +0100
commit040bfcc09c851bb3dadd60558c78a1f7937e9fbd (patch)
tree4af85b2ee317528a080422e5893cc01fae079dcb /rest_framework/utils
parenta7518719917c7ad8e699119b442cfeb568ba1dde (diff)
downloaddjango-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.py2
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'):