is it possible to have default value condition base on time? i tried before but return an error e.g. 1
table.shift.default = 1 if request.now.hour() >= 0 & request.now.hour() <= 8 else 2 if request.now.hour() >= 8 & request.now.hour() <= 16 else 3 TypeError: 'int' object is not callable e.g. 2 table.shift.default = 1 if int(request.now.hour() ) >= 0 & int(request.now.hour() ) <= 8 else 2 if int(request.now.hour() ) >= 8 & int(request.now.hour() ) <= 16 else 3 TypeError: 'int' object is not callable any idea how to achive it in web2py way? thanks and best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.