This morning I tested the code above, it works.
A couple of things aren't clear to me.
In my model I also have a widget which reads like:
db.event.plaats.widget=lambda self,value:INPUT
(_type='text',_id='place',_class='ac_input',_name='plaats',value=str
(value),requires=self.requires)
The widget Chris provided me with reads like:
def timeplain(field,value):
if value == None:
value = ''
id = '%s_%s' % (field._tablename, field.name)
return INPUT
(_type='text',_id=id,_class='time_plain',_name=field.name,value=str
(value),requires=field.requires)
... and is set in the table definition:
db.Field('tijd',type='time',default='',notnull=True,widget=timeplain)
... whereas the other widget is set in the validator, don't I have to
set Chris' widget in a validator too? Furthermore, Chris' widget
doesn't use 'lambda self,value:' , why not?
Furthermore, when I enter a time in the time field both 10:00 and
10:00:00 pass validation. When I enter 1000 or 100000 an error message
is displayed: must be HH:MM:SS! How do I change this message to read
like: must be HH:MM! The time references the time at which a program
starts, so seconds are not relevant.
Finally, in one my views I have:
{{=db.event.from_date.formatter(event.from_date)}}
Is there something equivalent to get the time formatted correctly. i.e
10:00 instead of 10:00:00
Kind regards,
Annet.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---