From: Joel Pearson <j...@pythonica.com>
Date: Tue, 20 Nov 2007 18:20:11 -0700
Local: Tues, Nov 20 2007 8:20 pm
Subject: [TurboGears] Paginate: sorting by multiple fields in default_order
Roger Demetrescu wrote: Sorry for the delay. I just went to re-create the patch against the current > 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... :) version, but I won't be able to finish merging my changes for another 6 hours or so, due to prior commitments. Also, I didn't mention previously that my current version alters the appearance of the URL variable *_tgp_ordering from being a URL-encoded dict to being a simple comma-separated list of field names in sort order, with optional leading dashes on each field name to indicate reversed order. (Note: I didn't change any internal data structures, just how the URL is produced in get_href() and how it is parsed in convert_order().) 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 This would break any existing bookmarks, but it would be easy enough to add I'll open the ticket once the patch is ready. Let me know what to do about the - Joel 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.
| ||||||||||||||