That was it! THANK YOU! Why does it work without a signature though?
On Friday, June 6, 2014 1:03:35 PM UTC-4, Fabiano Almeida wrote:
>
> Try:
>
> grid = SQLFORM.grid(db.table, user_signature=False)
>
> Em sexta-feira, 6 de junho de 2014 13h10min34s UTC-3, LoveWeb2py escreveu:
>>
>> Hi Fabiano,
>>
>> I actually was already using grid= SQLFORM.grid(db.new_table). That is
>> when I get the error.
>>
>> If I do grid='' to test it and just return the table without SQLFORM I
>> can see it in the view, but when I apply SQLFORM I get the error 'Rows'
>> object has no attribute '_db'.
>>
>> I'm guessing this is because of the way SQLFORM handles the grid? Could
>> there be something in my model messing it up?
>>
>> On Friday, June 6, 2014 12:02:05 PM UTC-4, Fabiano Almeida wrote:
>>>
>>> Hi,
>>>
>>> You send var grid (see: return dict(grid=grid)). The first var grid is
>>> a send var to your view, de second var grid is a local var of your
>>> function.
>>>
>>> Then,
>>> in controller use:
>>> grid = SQLFORM.grid(db.new_table)
>>> return dict(grid=grid)
>>>
>>> in the view use:
>>> {{=grid}}
>>>
>>> Fabiano.
>>>
>>>
>>> 2014-06-06 12:45 GMT-03:00 LoveWeb2py <[email protected]>:
>>>
>>>> SQLFORM isn't working for me with
>>>>
>>>>
>>>> new_table = db(db.table1.id.belongs(record_ids)).select()
>>>> if I do {{=new_table}} in my view I can see the records which belong to
>>>> record_ids, but if I do:
>>>>
>>>> SQLFORM.grid(new_table)
>>>> return dict(grid=grid)
>>>>
>>>>
>>>> I get an error 'Rows' object has no attribute '_db'
>>>>
>>>> --
>>>> 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.
>>>>
>>>
>>>
--
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.