tickets: 3382
This data as json
id | created | changetime | last_pulled_from_trac | stage | status | component | type | severity | version | resolution | summary | description | owner | reporter | keywords | easy | has_patch | needs_better_patch | needs_tests | needs_docs | ui_ux |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3382 | 2007-01-28 23:17:07 | 2007-12-01 14:20:55 | 2022-03-06 03:28:34.029987 | Design decision needed | closed | Database layer (models, ORM) | dev | wontfix | FloatField values get rounded on save() | Django uses the %s format code to insert FloatField values into SQL command strings to send to the database. However, the %s format code rounds floating point numbers to 12 significant digits, which may cause unexpected rounding when the FloatField is configured to store more than 12 digits. I would have expected Django to use the '%.xf' format code, where x = decimal_places specified for the FloatField in the model definition, which would prevent rounding when saving to the database. | nobody | rfugger at gmail dot com | float rounding | 0 | 0 | 0 | 0 | 0 | 0 |