Hi all,

I'm looking for a way to store and use floating point values with the
Django models. models.FloatField won't do, since that's (generally)
implemented as numeric in the db, I believe, and I'm having to deal
with values ranging from eg 5.5e5 to 5.5e55; that is, they would have
max_digits=55 or so, but the precision is only 2 digits (and the number
of 'decimal_places'  is presumably 0). Which would end up as a waste of
storage space, imo.
Ticket 2365 ( http://code.djangoproject.com/ticket/2365 ) discusses
this problem, although from another viewpoint.
I'd like a floating point value/field (or double, but that's the same
in Python, though not in every db) with a number of significant digits.
The latter can be stored in a separate field (unsigned int), but for
the first one (float/double), the current FloatField would be storage
overkill, while using a TextField wouldn't allow proper sorting on
value in the db.
Does anyone have a suggestion? With the fast changes in Django
currently, I'm not too inclined to hack the source code and add a field
(changes are I just mess up anway), but I'm a bit at loss what's a good
solution.

Thanks,

 Evert


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to