﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
1364	MySQL 5.0.3+ and meta.FloatFields don't mix	ben@…	Adrian Holovaty	"Before MySQL 5.0.3, decimal types were stored unpacked, and behaved like chars; later versions store them as packed, fixed point numbers. More details [http://dev.mysql.com/doc/refman/5.0/en/numeric-type-overview.html here]. This makes Python's formatting unhappy and a '''TypeError: Float argument required''' is raised.

Some [http://mail.zope.org/pipermail/zope/2005-May/158907.html Zope] [http://mail.zope.org/pipermail/zope/2005-May/158908.html folks] had trouble with it too. The fix is easy though; just cast field_val to float(), like on line 158 of django/contrib/admin/templatetags/admin_list.py:

{{{

- result_repr = ('%%.%sf' % f.decimal_places) % field_val
+ result_repr = ('%%.%sf' % f.decimal_places) % float(field_val)
}}}

This isn't a data loss bug or anything, but I'm sure it's irritating to anyone using recent MySQL versions."	defect	closed	contrib.admin		normal	fixed			Unreviewed	0	0	0	0	0	0
