Ticket #1618 (closed enhancement: fixed)
Paginate should allow multiple fields in default_order
| Reported by: | roger.demetrescu | Owned by: | roger.demetrescu |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.0.4 |
| Component: | TurboGears | Version: | 1.0.3.2 |
| Severity: | normal | Keywords: | paginate |
| Cc: |
Description
Joel Pearson raised an interesting idea on ML, about allowing paginate decorator to specify the default ordering with multiple fields.
People discussed the idea and came to these:
- default_reversed should be deprecated (with a warning).
- default_order can be a single string or a list of strings.
- default_order="-foobar" means (default_order="foobar", default_reversed=True)
- default_order=["foo", "-bar", "cuz"] means: order by foo ASC, bar DESC, cuz ASC (in SQL dialect :) )
- trying to use default_order=["foo", "-bar"] and default_reversed is an error.
Change History
Note: See
TracTickets for help on using
tickets.
Forgot to give the link of the ML thread:
http://groups.google.com/group/turbogears/browse_thread/thread/1e285cc190373563