From: "Roger Demetrescu" <roger.demetre...@gmail.com>
Date: Tue, 20 Nov 2007 23:34:24 -0300
Local: Tues, Nov 20 2007 9:34 pm
Subject: Re: [TurboGears] Paginate: sorting by multiple fields in default_order
On Nov 20, 2007 10:20 PM, Joel Pearson <j...@pythonica.com> wrote:
> Roger Demetrescu wrote: Hmm.. the actual code already produces an ugly URL when you start > > Have you any news on this ? > > I'd really like to see this feature in TG 1.0.4.... ;) > > If you can quickly fill a ticket with your patch, we can ask Florent > > And don't worry about tests. I can code them before applying your patch... :) > Sorry for the delay. I just went to re-create the patch against the current > Thus, what previously looked like this (in the URL): > company_tgp_ordering=%7B%27state%27%3A%20%5B1%2C%20True%5D%2C%20u%27city%27 %3A%20%5B0%2C%20True%5D%7D > now looks like this: > company_tgp_ordering=state,city changing the order of columns, so I think this is not an issue. Basically the core portion of my modification became: ==== if isinstance(default_order, basestring): ordering = dict([(v.lstrip('-'), [k, not v.startswith('-')]) BTW, It doesn't handle some strange configuration, like ['city', I hope it will work as expected... :) []s You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||