Opened 16 years ago

Closed 15 years ago

#4809 closed (duplicate)

supply a pagination templatetag that takes in a paginator object

Reported by: Gary Wilson <gary.wilson@…> Owned by: nobody
Component: Template system Version: dev
Severity: Keywords:
Cc: Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


I've seen a few different pagination template tags out there, one example is PaginatorTag. I think this is such a common thing that it should be added to Django. There is a good bit of logic and template code that this sort of template tag needs, and it seems a bit un-DRY to have to add such a chunk of code everywhere you want a list of pages to appear.

I think with a few configuration options, we could make 90% of users happy. Options like:

  • behavior -- [full] list / [surrounding] X pages / [current] page only
  • show first/last -- True / False
  • show previous/next -- True / False

The template tag might look something like:

{% paginator <paginator_object> behavior full firstlast True prevnext True %}

This gets even better (for generic views) if #4805 is implemented.

Change History (3)

comment:1 Changed 16 years ago by Gary Wilson <gary.wilson@…>

Triage Stage: UnreviewedDesign decision needed

comment:3 Changed 15 years ago by James Bennett

Resolution: duplicate
Status: newclosed

I think this would be a good implementation, but let's keep the discussion in/around #3169.

Note: See TracTickets for help on using tickets.
Back to Top