[web2py] Re: not authorised flash message when I used SQLFORM.grid, but worked fine with SQLFORM.smartgrid

2017-06-02 Thread akshay05kumar
hi Rudy, I am facing the same issue. Did you get why this is happeneing? On Saturday, April 22, 2017 at 1:49:15 PM UTC+5:30, Rudy wrote: > > Hi there, > > It feels really strange to me that when i used SQLFORM.grid(), I got a > flash message "not authorised", but when i used smartgrid()

[web2py] adding minutes in field which has datatype as 'datetime'

2017-05-29 Thread akshay05kumar
Hello all, I have a table in database as: db.define_table('job', Field('schedule_time','datetime',default = request.now)) I want to compare the (value in schedule_time field + 3 minutes) with current time(getting that by using request.now). So my question is does web2py handles this adding

[web2py] Re: how to compare date time in web2py?

2017-05-26 Thread akshay05kumar
You can compare time here by using the relational operators. Access the current time by using 'request.now' (its value will be in same format as 'update_on' field of your table) then you can just compare it as : if (dbquery).updated_time > request.now: //do something On Thursday, July