How to show total pages in JSON response in Django Pagination?
问题 I am currently working on pagination in Django restful framework. I am successfully done with pagination. but the problem I am facing is that "JSON response does not include information about total pages in my query and other information like total records etc". how can I include this information in my response. my view.py is from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger #######################View all mobiles @api_view(['GET']) def getAll_Mobiles(request): try: