Usage of PageLinks is straight forward. Create and initialise an instance of the class and then call the get_links() method:
pageLinks = he3.db.tower.paging.PageLinks( page=2,
page_count=3, url_root='http://myresources/', page_field='page')
Sequence_of_links = pageLinks.get_links()
Sequence_of_links now equals:
[('prev', 'http://myresources/?page=1'),
('1', 'http://myresources/?page=1'),
('2', 'http://myresources/?page=1'),
('3', 'http://myresources/?page=2'),
('next', 'http://myresources/?page=3')]
This is simple helper class. I think I am most proud of the fact I finally made good use of a Python List Comprehension.
I have been using this replica watch, Replica Audemars Piguet Watchesit is a very beautiful and affordable automatic watch, good size, great quality, elegant and temperament, is my favorite style. Replica Audemars Piguet royal oak offshoreI shared this website with my friends and they were very happy.
ReplyDelete