[web2py] Re: Grid with multiple left joins

2013-01-30 Thread Massimo Di Pierro
This is in trunk. Can you please check it.

On Wednesday, 23 January 2013 10:02:03 UTC-6, Mark wrote:

 I also hope this can be done. In sqlhtml.py, simply change following code:

 if left is not None:
 tablenames += db._adapter.tables(left)

 into:

 if left is not None:
 if isinstance(left, (list)):
 for l in left:
 tablenames += db._adapter.tables(l)
 else:
 tablenames += db._adapter.tables(left)



 On Friday, January 18, 2013 11:17:19 AM UTC-5, Massimo Di Pierro wrote:

 Looks good.
 Can you please send me a patch applied to the trunk version? 

 On Friday, 18 January 2013 05:47:20 UTC-6, Felipe Meirelles wrote:

 Did anyone saw it?

 On Monday, January 14, 2013 5:41:36 PM UTC-2, Felipe Meirelles wrote:

 Please desconsider the sorter_icons parameter, its a custom 
 implementation of mine.
 I can post this patch too if you think its relevant.

 Thanks!

 On Monday, January 14, 2013 5:38:53 PM UTC-2, Felipe Meirelles wrote:

 Hi,

 When you try to make more than one left join on a SQLFORM.grid as:

 grid = SQLFORMCustom.grid(db.device,
 fields=[db.device.serial, db.device.device_type, 
 db.device.vehicle, db.vehicle.plate, db.chip.imei, ],
 field_id=db.device.id,
 left=[db.chip.on(db.chip.id==db.device.chip), db.vehicle.on(
 db.vehicle.id==db.device.vehicle)],
 paginate=max_results,
 showbuttontext=False,
 formstyle='divs',
 paginate_icons=paginate_icons,
 sorter_icons=sorter_icons
 )

 it can't display the join fields as it dosen't find the fields on the 
 query in sqlhtml.py line 1083.

 Can you apply this patch on line 1083?

 if left is not None:
 if isinstance(left, (list)):
 for l in left:
 tablenames += db._adapter.tables(l)
 else:
 tablenames += db._adapter.tables(left)



-- 

--- 
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.




[web2py] Re: Grid with multiple left joins

2013-01-30 Thread Mark
Yes, it works. Thanks!

On Wednesday, January 30, 2013 10:28:23 AM UTC-5, Massimo Di Pierro wrote:

 This is in trunk. Can you please check it.

 On Wednesday, 23 January 2013 10:02:03 UTC-6, Mark wrote:

 I also hope this can be done. In sqlhtml.py, simply change following code:

 if left is not None:
 tablenames += db._adapter.tables(left)

 into:

 if left is not None:
 if isinstance(left, (list)):
 for l in left:
 tablenames += db._adapter.tables(l)
 else:
 tablenames += db._adapter.tables(left)



 On Friday, January 18, 2013 11:17:19 AM UTC-5, Massimo Di Pierro wrote:

 Looks good.
 Can you please send me a patch applied to the trunk version? 

 On Friday, 18 January 2013 05:47:20 UTC-6, Felipe Meirelles wrote:

 Did anyone saw it?

 On Monday, January 14, 2013 5:41:36 PM UTC-2, Felipe Meirelles wrote:

 Please desconsider the sorter_icons parameter, its a custom 
 implementation of mine.
 I can post this patch too if you think its relevant.

 Thanks!

 On Monday, January 14, 2013 5:38:53 PM UTC-2, Felipe Meirelles wrote:

 Hi,

 When you try to make more than one left join on a SQLFORM.grid as:

 grid = SQLFORMCustom.grid(db.device,
 fields=[db.device.serial, db.device.device_type, 
 db.device.vehicle, db.vehicle.plate, db.chip.imei, ],
 field_id=db.device.id,
 left=[db.chip.on(db.chip.id==db.device.chip), db.vehicle.on(
 db.vehicle.id==db.device.vehicle)],
 paginate=max_results,
 showbuttontext=False,
 formstyle='divs',
 paginate_icons=paginate_icons,
 sorter_icons=sorter_icons
 )

 it can't display the join fields as it dosen't find the fields on the 
 query in sqlhtml.py line 1083.

 Can you apply this patch on line 1083?

 if left is not None:
 if isinstance(left, (list)):
 for l in left:
 tablenames += db._adapter.tables(l)
 else:
 tablenames += db._adapter.tables(left)



-- 

--- 
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.




Re: [web2py] Re: Grid with multiple left joins

2013-01-30 Thread Felipe Meirelles
Thanks Massimo, all working (:


On Wed, Jan 30, 2013 at 2:38 PM, Mark czhang2...@gmail.com wrote:

 Yes, it works. Thanks!


 On Wednesday, January 30, 2013 10:28:23 AM UTC-5, Massimo Di Pierro wrote:

 This is in trunk. Can you please check it.

 On Wednesday, 23 January 2013 10:02:03 UTC-6, Mark wrote:

 I also hope this can be done. In sqlhtml.py, simply change following
 code:

 if left is not None:
 tablenames += db._adapter.tables(left)

 into:

 if left is not None:
 if isinstance(left, (list)):
 for l in left:
 tablenames += db._adapter.tables(l)
 else:
 tablenames += db._adapter.tables(left)



 On Friday, January 18, 2013 11:17:19 AM UTC-5, Massimo Di Pierro wrote:

 Looks good.
 Can you please send me a patch applied to the trunk version?

 On Friday, 18 January 2013 05:47:20 UTC-6, Felipe Meirelles wrote:

 Did anyone saw it?

 On Monday, January 14, 2013 5:41:36 PM UTC-2, Felipe Meirelles wrote:

 Please desconsider the sorter_icons parameter, its a custom
 implementation of mine.
 I can post this patch too if you think its relevant.

 Thanks!

 On Monday, January 14, 2013 5:38:53 PM UTC-2, Felipe Meirelles wrote:

 Hi,

 When you try to make more than one left join on a SQLFORM.grid as:

 grid = SQLFORMCustom.grid(db.device,
 fields=[db.device.serial, db.device.device_type,
 db.device.vehicle, db.vehicle.plate, db.chip.imei, ],
 field_id=db.device.id,
 left=[db.chip.on(db.chip.id==**db.device.chip),
 db.vehicle.on(db.vehicle.id==**db.device.vehicle)],
 paginate=max_results,
 showbuttontext=False,
 formstyle='divs',
 paginate_icons=paginate_icons,
 sorter_icons=sorter_icons
 )

 it can't display the join fields as it dosen't find the fields on
 the query in sqlhtml.py line 1083.

 Can you apply this patch on line 1083?

 if left is not None:
 if isinstance(left, (list)):
 for l in left:
 tablenames += db._adapter.tables(l)
 else:
 tablenames += db._adapter.tables(left)

  --

 ---
 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.






-- 
Att,
Felipe Meirelles.

-- 

--- 
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.




[web2py] Re: Grid with multiple left joins

2013-01-23 Thread Mark
I also hope this can be done. In sqlhtml.py, simply change following code:

if left is not None:
tablenames += db._adapter.tables(left)

into:

if left is not None:
if isinstance(left, (list)):
for l in left:
tablenames += db._adapter.tables(l)
else:
tablenames += db._adapter.tables(left)



On Friday, January 18, 2013 11:17:19 AM UTC-5, Massimo Di Pierro wrote:

 Looks good.
 Can you please send me a patch applied to the trunk version? 

 On Friday, 18 January 2013 05:47:20 UTC-6, Felipe Meirelles wrote:

 Did anyone saw it?

 On Monday, January 14, 2013 5:41:36 PM UTC-2, Felipe Meirelles wrote:

 Please desconsider the sorter_icons parameter, its a custom 
 implementation of mine.
 I can post this patch too if you think its relevant.

 Thanks!

 On Monday, January 14, 2013 5:38:53 PM UTC-2, Felipe Meirelles wrote:

 Hi,

 When you try to make more than one left join on a SQLFORM.grid as:

 grid = SQLFORMCustom.grid(db.device,
 fields=[db.device.serial, db.device.device_type, 
 db.device.vehicle, db.vehicle.plate, db.chip.imei, ],
 field_id=db.device.id,
 left=[db.chip.on(db.chip.id==db.device.chip), db.vehicle.on(
 db.vehicle.id==db.device.vehicle)],
 paginate=max_results,
 showbuttontext=False,
 formstyle='divs',
 paginate_icons=paginate_icons,
 sorter_icons=sorter_icons
 )

 it can't display the join fields as it dosen't find the fields on the 
 query in sqlhtml.py line 1083.

 Can you apply this patch on line 1083?

 if left is not None:
 if isinstance(left, (list)):
 for l in left:
 tablenames += db._adapter.tables(l)
 else:
 tablenames += db._adapter.tables(left)



-- 





[web2py] Re: Grid with multiple left joins

2013-01-18 Thread Felipe Meirelles
Did anyone saw it?

On Monday, January 14, 2013 5:41:36 PM UTC-2, Felipe Meirelles wrote:

 Please desconsider the sorter_icons parameter, its a custom implementation 
 of mine.
 I can post this patch too if you think its relevant.

 Thanks!

 On Monday, January 14, 2013 5:38:53 PM UTC-2, Felipe Meirelles wrote:

 Hi,

 When you try to make more than one left join on a SQLFORM.grid as:

 grid = SQLFORMCustom.grid(db.device,
 fields=[db.device.serial, db.device.device_type, 
 db.device.vehicle, db.vehicle.plate, db.chip.imei, ],
 field_id=db.device.id,
 left=[db.chip.on(db.chip.id==db.device.chip), db.vehicle.on(
 db.vehicle.id==db.device.vehicle)],
 paginate=max_results,
 showbuttontext=False,
 formstyle='divs',
 paginate_icons=paginate_icons,
 sorter_icons=sorter_icons
 )

 it can't display the join fields as it dosen't find the fields on the 
 query in sqlhtml.py line 1083.

 Can you apply this patch on line 1083?

 if left is not None:
 if isinstance(left, (list)):
 for l in left:
 tablenames += db._adapter.tables(l)
 else:
 tablenames += db._adapter.tables(left)



-- 





[web2py] Re: Grid with multiple left joins

2013-01-18 Thread Massimo Di Pierro
Looks good.
Can you please send me a patch applied to the trunk version? 

On Friday, 18 January 2013 05:47:20 UTC-6, Felipe Meirelles wrote:

 Did anyone saw it?

 On Monday, January 14, 2013 5:41:36 PM UTC-2, Felipe Meirelles wrote:

 Please desconsider the sorter_icons parameter, its a custom 
 implementation of mine.
 I can post this patch too if you think its relevant.

 Thanks!

 On Monday, January 14, 2013 5:38:53 PM UTC-2, Felipe Meirelles wrote:

 Hi,

 When you try to make more than one left join on a SQLFORM.grid as:

 grid = SQLFORMCustom.grid(db.device,
 fields=[db.device.serial, db.device.device_type, 
 db.device.vehicle, db.vehicle.plate, db.chip.imei, ],
 field_id=db.device.id,
 left=[db.chip.on(db.chip.id==db.device.chip), db.vehicle.on(
 db.vehicle.id==db.device.vehicle)],
 paginate=max_results,
 showbuttontext=False,
 formstyle='divs',
 paginate_icons=paginate_icons,
 sorter_icons=sorter_icons
 )

 it can't display the join fields as it dosen't find the fields on the 
 query in sqlhtml.py line 1083.

 Can you apply this patch on line 1083?

 if left is not None:
 if isinstance(left, (list)):
 for l in left:
 tablenames += db._adapter.tables(l)
 else:
 tablenames += db._adapter.tables(left)



-- 





[web2py] Re: Grid with multiple left joins

2013-01-14 Thread Felipe Meirelles
Please desconsider the sorter_icons parameter, its a custom implementation 
of mine.
I can post this patch too if you think its relevant.

Thanks!

On Monday, January 14, 2013 5:38:53 PM UTC-2, Felipe Meirelles wrote:

 Hi,

 When you try to make more than one left join on a SQLFORM.grid as:

 grid = SQLFORMCustom.grid(db.device,
 fields=[db.device.serial, db.device.device_type, 
 db.device.vehicle, db.vehicle.plate, db.chip.imei, ],
 field_id=db.device.id,
 left=[db.chip.on(db.chip.id==db.device.chip), db.vehicle.on(
 db.vehicle.id==db.device.vehicle)],
 paginate=max_results,
 showbuttontext=False,
 formstyle='divs',
 paginate_icons=paginate_icons,
 sorter_icons=sorter_icons
 )

 it can't display the join fields as it dosen't find the fields on the 
 query in sqlhtml.py line 1083.

 Can you apply this patch on line 1083?

 if left is not None:
 if isinstance(left, (list)):
 for l in left:
 tablenames += db._adapter.tables(l)
 else:
 tablenames += db._adapter.tables(left)


--