#14659: Assigning floats to DecimalFields
------------------------------------------+---------------------------------
Reporter: maraujop | Owner: maraujop
Status: new | Milestone: 1.3
Component: Database layer (models, ORM) | Version: SVN
Keywords: DecimalField, float | Stage: Unreviewed
Has_patch: 1 |
------------------------------------------+---------------------------------
{{{DecimalField}}} does not accept a float as a parameter, as it should be
first converted to a string. So if you have {{{DecimalField}}} in a model,
you will not be able to assign a float to it.
{{{
class Item(models.Model):
weight = models.DecimalField(max_digits=7, decimal_places = 2)
Item.objects.create(weight=100.43)
}}}
The patch passes Django tests, regards
Miguel Araujo
--
Ticket URL: <http://code.djangoproject.com/ticket/14659>
Django <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.