#3324: FloatFields are converted to decimal and simplejson cannot serialize
------------------------------+---------------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: jacob
Status: closed | Component: Serialization
Version: SVN | Resolution: worksforme
Keywords: | Stage: Accepted
Has_patch: 0 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
------------------------------+---------------------------------------------
Comment (by [EMAIL PROTECTED]):
{{{
class Blah(models.Model):
blub = models.FloatField(decimal_places=20, max_digits=27)
}}}
and the failing code:
{{{
def test():
a = Blah()
a.blub = 10980970.560287459837987986
a.save()
print serialize("json", Blah.objects.all())
}}}
note that this only happens on MySQL, it works fine in combination with
SQLite
--
Ticket URL: <http://code.djangoproject.com/ticket/3324#comment:4>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---