🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

django-ninja-cursor-pagination

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

django-ninja-cursor-pagination

A Django Ninja extension for cursor-based pagination.

0.1.0
Maintainers
2

django-ninja-cursor-pagination

This library adds a new pagination class for use with django-ninja which supports cursor-based pagination.

Installation

pip install django-ninja-cursor-pagination

Usage

from ninja.pagination import paginate
from ninja_cursor_pagination import CursorPagination

@router.get("/things", response=list[ThingSchema])
@paginate(CursorPagination)
def list_things(request):
    return Thing.objects.order_by("title")

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts