Hi Akshay, I don’t know where the problem was. As mentioned in previous thread, after i used smartgrid to continue the development for a few days, it went away. One thing i notice is the editor from the administrative interface gets funny behavior sometimes, the compiler raises error but I simply can’t find what goes wrong with the specific line pointed out from the ticket, if I delete the line and retype exactly the same thing (I even had 2 lines side by side to compare the difference), the error goes away. But I can’t explain why below issue complains about “not authorised”, well try to refresh your editor or use another editor to check the code, perhaps restart web2py. I know it sounds silly, but they are quick test. cheers!
> On 2 Jun, 2017, at 7:07 pm, [email protected] wrote: > > 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(), it worked just fine > (in both cases i had logged in already). I tried to removed > @auth.requires_login(), but same behaviour happened. I seem to miss some very > fundamental knowledge using SQLFORM.grid(). Below is the simplified code. Any > help is much appreciated. > > @auth.requires_login() > def list_items2(): > response.view='accounting/list_items.html' > grid = SQLFORM.grid(db.auth_user) > return locals() > > -- > Resources: > - http://web2py.com <http://web2py.com/> > - http://web2py.com/book <http://web2py.com/book> (Documentation) > - http://github.com/web2py/web2py <http://github.com/web2py/web2py> (Source > code) > - https://code.google.com/p/web2py/issues/list > <https://code.google.com/p/web2py/issues/list> (Report Issues) > --- > You received this message because you are subscribed to a topic in the Google > Groups "web2py-users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/web2py/yhj6iVXgHEM/unsubscribe > <https://groups.google.com/d/topic/web2py/yhj6iVXgHEM/unsubscribe>. > To unsubscribe from this group and all its topics, send an email to > [email protected] > <mailto:[email protected]>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.

