Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1618 (closed enhancement: fixed)

Opened 9 years ago

Last modified 9 years ago

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

comment:1 Changed 9 years ago by roger.demetrescu

comment:2 Changed 9 years ago by roger.demetrescu

  • Status changed from new to closed
  • Resolution set to fixed

Committed in [3744] and [3745].

Note: See TracTickets for help on using tickets.