From: Jorge Godoy <jgo...@gmail.com>
Date: Sun, 18 Nov 2007 22:45:13 -0200
Local: Sun, Nov 18 2007 7:45 pm
Subject: Re: [TurboGears] Re: Paginate: sorting by multiple fields in default_order
Em Thursday 15 November 2007 03:20:53 Joel Pearson escreveu:
> Actually, I was thinking that default_reversed could be eliminated entirely > I prefer these: > @paginate('table', default_order='-field1') > to these: > @paginate('table', default_order='field1', default_reversed=True) > The only use case I can think of for expanding default_reversed into a list It could also be that: > is that it is somewhat easier to programmatically toggle the True/False > values in a list structure (default_reversed) than it is to add and remove > the leading dashes in a list of strings (default_order). The price you pay > for having "more than one way to do it", however, is the potential for > confusing application code like this: > # what's the actual order? > along with the additional logic in paginate.py to calculate the actual sort if default_order[n].startswith('-'): I.e., we don't allow cascading the two different options. If default_reversed is going away, deprecated messages should be issued as > All things considered, I'd prefer to (eventually) phase out +1 from me, with deprecated messages. > default_reversed, rather than expand it, but I welcome other opinions. :-) -- 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.
| ||||||||||||||