[web2py] Re: SQLFORM and scientific notation support.

2012-03-07 Thread Kimmo
Followed Anthony's idea and now everything works! Thanks to everybody who helped with this and specially Anthony for the final advice. - Kimmo On Mar 7, 5:05 pm, Anthony wrote: > Maybe you could monkey patch SQLFORM: > > SQLFORM.widgets.double = my_double_widget > > Technically, that won't

[web2py] Re: SQLFORM and scientific notation support.

2012-03-07 Thread Anthony
Maybe you could monkey patch SQLFORM: SQLFORM.widgets.double = my_double_widget Technically, that won't change the "widget" attribute of the DAL Field, but it will cause SQLFORM to use your widget instead of the default DoubleWidget whenever it encounters a double field that doesn't have an ex

Re: [web2py] Re: SQLFORM and scientific notation support.

2012-03-07 Thread Manuele Pesenti
Il 07/03/2012 10:01, Kimmo ha scritto: I made a (ugly hack) custom widget for all the Fields that have double type. Now E notation and normal double values work perfectly (edit / save / viewing). How do i set this widget as a default widget for all the Fields that have double type in my model? I

[web2py] Re: SQLFORM and scientific notation support.

2012-03-07 Thread Kimmo
I made a (ugly hack) custom widget for all the Fields that have double type. Now E notation and normal double values work perfectly (edit / save / viewing). How do i set this widget as a default widget for all the Fields that have double type in my model? I would rather like to avoid setting this

[web2py] Re: SQLFORM and scientific notation support.

2012-03-05 Thread Kimmo
Thank you again for your quick response! I commented out the line and I can now submit E notation values like "1e-06" which is excellent. After testing I noticed that if you return to see the update form again the field will show value "1e-06.00" and if you press submit it will produce a warning