Re: [web2py] Re: smartgrid orderby descending
Hi Dan. Sorry, but I can't remember if I ever got that problem solved. I did have this response to the question "I believe the keys of the orderby dict should be the actual table names, not the literal keys "parent" and "child"." I've not actually touched web2py in a while since I moved on to flask. Sorry I'm not more help. J On Fri, Mar 7, 2014 at 6:41 PM, Dan Kozlowski wrote: > Jake, > > Did you ever get this to work ? Reason being I think I have the same > problem. > > > On Sunday, April 21, 2013 9:47:59 AM UTC-5, Jake Lowen wrote: >> >> In a normal grid the orderby descending works just fine: >> >> grid = SQLFORM.grid(db.meetings, >> orderby=~db.meetings.meeting_date, >> ) >> >> But I can't get the parent table of a smart group to sort the same way: >> >> grid = SQLFORM.smartgrid(db.meetings, >> linked_tables=['meeting_docs'], >> orderby=dict(parent=~db.meetings.meeting_date, child=None), >> ) >> >> What is the correct syntax to descent sort the parent table in a >> smartgrid? >> > -- > 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 a topic in the > Google Groups "web2py-users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/web2py/0XlEIXuCaG8/unsubscribe. > > To unsubscribe from this group and all its topics, send an email to > web2py+unsubscr...@googlegroups.com. > 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: smartgrid orderby descending
Jake, Did you ever get this to work ? Reason being I think I have the same problem. On Sunday, April 21, 2013 9:47:59 AM UTC-5, Jake Lowen wrote: > > In a normal grid the orderby descending works just fine: > > grid = SQLFORM.grid(db.meetings, > orderby=~db.meetings.meeting_date, > ) > > But I can't get the parent table of a smart group to sort the same way: > > grid = SQLFORM.smartgrid(db.meetings, > linked_tables=['meeting_docs'], > orderby=dict(parent=~db.meetings.meeting_date, child=None), > ) > > What is the correct syntax to descent sort the parent table in a smartgrid? > -- 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/d/optout.
[web2py] Re: smartgrid orderby descending
I believe the keys of the orderby dict should be the actual table names, not the literal keys "parent" and "child". Anthony On Sunday, April 21, 2013 10:47:59 AM UTC-4, Jake Lowen wrote: > > In a normal grid the orderby descending works just fine: > > grid = SQLFORM.grid(db.meetings, > orderby=~db.meetings.meeting_date, > ) > > But I can't get the parent table of a smart group to sort the same way: > > grid = SQLFORM.smartgrid(db.meetings, > linked_tables=['meeting_docs'], > orderby=dict(parent=~db.meetings.meeting_date, child=None), > ) > > What is the correct syntax to descent sort the parent table in a smartgrid? > -- --- 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.