Thanks a lot, Anssi!  
This is very helpful.
Just in case someone else is interested in "Writing custom model fields", 
here is a link to Django's docs: 
https://docs.djangoproject.com/en/dev/howto/custom-model-fields/

Thank you once again,
-igor


On Thursday, 14 June 2012 05:18:40 UTC-4, akaariai wrote:
>
> On 12 kesä, 18:50, IgorS <igor.shm...@gmail.com> wrote: 
> > Hi ALL! 
> > 
> > It seems that there is no class in Django models that represents 4-byte 
> > data type "real" in postgres. I looked into 
> > django\db\backends\postgresql_psycopg2\creation.py but could not find it 
> > there. The only choice seems to be FloatField, which represents "double 
> > precision" in postgres. But i would like to use "real" to minimize the 
> > index size? How can i do it? 
>
> It might be you will need to do a FloatField subclass - RealField, 
> which will return "REAL" as its database type from field.db_type(). It 
> has been a while since last dealing with custom fields so there might 
> be something more needed. Django's documentation should contain more 
> information. 
>
>  - Anssi

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/BLHtqdBwZJ8J.
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