Hi Massimo,

url i used was "localhost:8000/myapp/accounting/list_item2", the actual 
table i tried to pull data out was named "quotation", it didn't work with 
SQLFORM.grid(), so i tried the very basic like example grid = 
SQLFORM.grid(db.auth_user), but still didn't work. But when I used 
SQLFORM.smartgrid() without changing anything, it worked.

The last few days I used SQLFORM.smartgrid() in order to continue develop 
my application, after i saw your note, I tried SQLFORM.grid(), it worked. 
It's really strange, apologize I may seem to waste your time, but I had 
that strange problem when i thought i didn't miss anything. If i can ever 
reproduce it, I'll let you know. Thanks so much!


On Thursday, April 27, 2017 at 9:50:59 AM UTC+8, Massimo Di Pierro wrote:
>
> Strange what is the url that you are using to access this page?
>
> On Saturday, 22 April 2017 03:19:15 UTC-5, 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/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.

Reply via email to