17.10.2012 14:28, Michał Nowotka kirjoitti:
Even if I don't mention inspectdb the problem still persists.
The basic question is how to map oracle NUMBER type from some model type.
If I understand this correctly, currently this is not supported.
In principle models.FloatField should handle it and give and option to
decide if the filed should me mapped into FLOAT or NUMBER.

But maybe (this requires some more oracle knowledge) that FLOAT is
just an alias of NUMBER(38,19).


Actually that is incorrect. Oracle equivalent for python float (and Django FloatField) is BINARY_FLOAT.

Oracle NUMBER must map to DecimalField with correct precisions and numbers. Since property of NUMBER field is to preserve accuracy (it's fixed point field).

Though there is not anyway to do it simply without knowledge of underlying database and context of your application. What you can do is create your own custom field and use just a NUMBER datatype.

See https://docs.djangoproject.com/en/1.4/howto/custom-model-fields/ for more information.

--
Jani Tiainen

- Well planned is half done and a half done has been sufficient before...

--
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to