Bishwas-py / djapy

No bullshit, Django Rest API Framework
https://djapy.io
61 stars 3 forks source link

Pagination mechanism needed #7

Closed Bishwas-py closed 7 months ago

Bishwas-py commented 7 months ago

Something of this syntax. And it could be able to apply pagination details in swagger/OpenAPI too.

@djapify
@djapily_paginated(OffsetLimitPagination)
def related_post(request, search_topic: str) -> {200: list[UserSchema], 401: ErrorMessage}:
    posts = Post.objects.filter(topic__icontains=search_topic)
    return 200, posts
Bishwas-py commented 7 months ago

the commit 3189b3f0e70ab9911f8722ad0a7f67a2d1dce77d added this.

Bishwas-py commented 7 months ago

How to add cursor pagination in my Djapy views. #10