Hello.
I've started using web2py recently for writing a GAE-enabled site.
As you know, BigTable does not have support for date/datetime fields
so I decided just to use 'integer' and store time.time() there. But
there is a problem with SQLFORM: I do not want user to see the actual
seconds since 1.01.1970 but rather a proper calendar or, in my case,
a three fields - day/month/year. So I ended up implementing an 'assotiated
field' - the actual db field go in as hidden one and my <input/>'s hook into
_validate chain and change the SQLFORM.vars on the fly. This is ugly
but I do not know how to do it better. May be someone on this list
encountered such problem before? Please share your experience.
Here is my code that I'd like to get rid of:
MyWidget=my_tools.DateWidget()
db.freight.time_ready_start.widget=MyWidget.widget
MyWidget.timespan=db.freight.time_ready_span # FIXME
--
Sincerely yours
Alexey Nezhdanov
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---