def make_paginated_api_response(results=None, count=0, num_pages=0, next_link=None, previous_link=None):
 return {'pagination': {'next': next_link, 'previous': previous_link, 'count': count, 'num_pages': num_pages}, 'results': (results or [])}

def make_paginated_api_response ( results = None , count = 0 , num_pages = 0 , next_link = None , previous_link = None ) : return { 'pagination' : { 'next' : next_link , 'previous' : previous_link , 'count' : count , 'num_pages' : num_pages } , 'results' : ( results or [ ] ) }
generates the response dictionary of paginated apis with passed data .