Thank you for perfect answer.
I have 2 workarounds: yours --or-- lazy_tables=True.
Both are good enough for me for now.



Dne pátek, 14. února 2014 14:55:15 UTC+1 Anthony napsal(a):
>
> A given table doesn't know about its linked tables until the tables are 
> fully defined, so you won't get any linked tables automatically when 
> lazy_tables=True. However, the following should work:
>
> SQLFORM.smartgrid(db.mytable, linked_tables=[db.othertable1, db.
> othertable2])
>
> Unfortunately, there is a bug that is preventing that from working right 
> now (in fact, the above won't work even with lazy_tables=False). I'll 
> submit a patch.
>
> Note, you cannot do linked_tables=['othertable1', 'othertable2'] (which 
> works when lazy_tables=False) -- you must use the [db.othertable1, 
> db.othertable2] format in order to trigger the full definition of those 
> tables.
>
> For now, as a workaround, you can just manually trigger the full table 
> definitions before calling smartgrid:
>
> db.othertable1, db.othertable2
> SQLFORM.smartgrid(db.mytable)
>
> Anthony
>
> On Friday, February 14, 2014 3:57:09 AM UTC-5, Mirek Zvolský wrote:
>>
>> If I set DAL(..., lazy_tables=True)
>> then smartgrid will not display linked_tables.
>> This occurs always, regardless if linked_tables are explicitly defined.
>>
>> Is it a bug or by design behavior?
>>
>> version is 2.8.2
>>
>

-- 
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/groups/opt_out.

Reply via email to