1 class PaginationMiddleware(object):
 
   3     Inserts a variable representing the current page onto the request object if
 
   4     it exists in either **GET** or **POST** portions of the request.
 
   6     def process_request(self, request):
 
   8             request.page = int(request['page'])