开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜