Reputation: 1126
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.
Upvotes: 1
Views: 508
Reputation: 4248
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.
Upvotes: 1