Opened 14 years ago

Last modified 5 years ago

#14218 closed

Paginator just implement the __iter__ function — at Initial Version

Reported by: mlhamel Owned by: nobody
Component: Core (Other) Version: 2.2
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Right now, when you want to iter into all the pages of a Paginator object you to use the page_range function. It would be more logical and naturel to use the normal python of doing that by implementing the iter function like that:

def iter(self):

for page_num in self.page_range:

yield self.page(page_num)

Change History (0)

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