Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 3 commits
  • 4 files changed
  • 0 commit comments
  • 1 contributor
View
2  Changelog
@@ -1,4 +1,4 @@
-2012-10-03 klen 1.9.8
+2012-10-03 klen 1.9.9
* Fix access logging
View
2  adrest/__init__.py
@@ -1,4 +1,4 @@
-version_info = (1, 9, 8)
+version_info = (1, 9, 9)
__version__ = version = '.'.join(map(str, version_info))
__project__ = PROJECT = __name__
View
6 adrest/utils/serializer.py
@@ -1,6 +1,5 @@
import abc
import collections
-import numbers
from datetime import datetime, date, time
from decimal import Decimal
@@ -41,9 +40,6 @@ def to_simple(self, value, **options):
if isinstance(value, Decimal):
return float(str(value))
- if isinstance(value, numbers.Number):
- return value
-
if isinstance(value, (datetime, date, time)):
return self.to_simple_datetime(value)
@@ -65,7 +61,7 @@ def to_simple(self, value, **options):
if isinstance(value, Model):
return self.to_simple_model(value, **options)
- return smart_unicode(value)
+ return value
@staticmethod
def to_simple_datetime(value):
View
4 tests/main/tests.py
@@ -37,8 +37,8 @@ def get(self, request):
response = test.dispatch(request)
self.assertContains(response, 'test')
- content = emitter.JSONSerializer().serialize([1, Decimal('3.4')])
- self.assertEqual(content, '[1, 3.4]')
+ content = emitter.JSONSerializer().serialize([1, Decimal('3.4'), None])
+ self.assertTrue('3.' in content and 'null' in content)
class MetaTest(TestCase):

No commit comments for this range

Something went wrong with that request. Please try again.