input time in web2py
I want to take 开发者_运维技巧input time to complete a task in format no. of days,hours in web2py. Is there any defined field,type for this in SQLField. time module in python allows only max 24 hours time.
Sorry Field(...'time') only allows 24 hours and there is no specific type for timeinterval. Yet you can make define one using:
timeinterval = SQLCustomType(....)
and use it as
Field('name',type=timeinterval, widget=....)
You can also make your own widget to handle it.
Please ask on the web2py mailing list so we keep the info in one place. I will be happy to provide a complete example.
精彩评论