#23320: FloatField not converting values to float()
----------------------------------------------+----------------------
Reporter: pjrobertson | Owner: nobody
Type: Uncategorized | Status: new
Component: Database layer (models, ORM) | Version: 1.7-rc-2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------------------+----------------------
Apologies for creating an issue if this is the expected behaviour (FWIW
there were no ideas on IRC):
Is the behaviour outlined in this snippet expected:
https://dpaste.de/BAck
I'd have expected the FloatField to convert values to a float in the
return object as well (I can verify that the `to_python` method is being
run, because the number is saved to the database correctly.
Is the recommended way of solving this to subclass FloatField and use?
{{{
class MyFloatField(with_metaclass(models.SubBaseField,
models.FloadField)):
...
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23320>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/054.6c9bae8c51b736e308e1dda8e2d379e9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.