Ticket #1410 (closed enhancement: fixed)

Opened 1 year ago

Last modified 6 months ago

[PATCH] Allow pagination of multiple variables

Reported by: beef Assigned to: faide
Priority: normal Milestone: 1.0.4
Component: TurboGears Version: 1.0.2
Severity: normal Keywords:
Cc:

Description

This patch allows pagination of multiple variables, simply by using the @paginate decorator multiple times on a particular controller. It maintains backwards compatibility with previous code, but introduces a new template variable: tg.paginates

This is a dictionary, indexed by variable name, which contains Paginate instances for all the paginated variables.

One can then use tg.paginatessome_var_name? in the same way that tg.paginate was previously used.

Attachments

paginate_multiple.diff.gz (1.5 kB) - added by beef on 06/19/07 03:38:33.
paginate_multiple_v2.diff (7.0 kB) - added by beef on 06/30/07 22:59:42.
Second, better version of the patch.

Change History

06/19/07 03:38:33 changed by beef

  • attachment paginate_multiple.diff.gz added.

06/28/07 16:58:17 changed by faide

  • owner changed from anonymous to faide.
  • status changed from new to assigned.

Sounds interesting I'll look into this :)

06/28/07 17:10:51 changed by faide

  • type changed from defect to enhancement.

Thanks for this patch! I'll look into the details of it asap.

One small remark : you should have attached the file in non-gzipped format so that trac preview could just display some nicely colored diff...

06/30/07 22:59:42 changed by beef

  • attachment paginate_multiple_v2.diff added.

Second, better version of the patch.

06/30/07 23:01:26 changed by beef

I made a better version of the patch.

It maintains (as much as possible) backwards compatibility with URIs generated by the previous paginate code.

And it doesn't pollute the URI with as many characters either.

Thanks,

Stuart

07/01/07 18:36:11 changed by faide

Thx again, we'll make sure to have this one in the next release...

07/23/07 13:26:47 changed by Chris Arndt

  • milestone changed from 1.0.3 to 1.0.4.

Batch promoting 1.0.3 tickets to Milestone 1.0.4

09/09/07 16:37:19 changed by faide

applied in r3492. It seemed to work for me for the last few days without bugs...

11/17/07 08:53:46 changed by roger.demetrescu

  • status changed from assigned to closed.
  • resolution set to fixed.

Closing the ticket.

Thanks for the good job, beef...