Skip to content

Added Pagination in the APIs#324

Open
yanurag-dev wants to merge 3 commits intodjangoindia:mainfrom
yanurag-dev:ticket_315
Open

Added Pagination in the APIs#324
yanurag-dev wants to merge 3 commits intodjangoindia:mainfrom
yanurag-dev:ticket_315

Conversation

@yanurag-dev
Copy link
Copy Markdown
Contributor

Closes #315

Type of change

  • Bug fix
  • Feature update
  • Breaking change
  • Documentation update

Author Checklist

  • Code has been commented, particularly in hard-to-understand areas
  • Changes generate no new warnings
  • Vital changes have been captured in unit and/or integration tests
  • New and existing unit tests pass locally with my changes
  • Documentation has been extended, if necessary
  • Merging to main from fork:branchname

@yanurag-dev
Copy link
Copy Markdown
Contributor Author

@DevilsAutumn I have started with this issue. can you pls verify am I on correct path as you wanted to implement this.

return self.paginator.get_paginated_response(data)


class BaseViewSet(TimezoneMixin, ModelViewSet, PaginationMixin):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think we need PaginationMixin in because ModelViewSet already has it as an attribute. So, if we simply add pagination_class=None, it will remove the pagination for that viewset.

Comment on lines +185 to +186
permission_classes = [IsAuthenticated]
permission_classes = [AllowAny]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please revert

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did just for testing purpose

@DevilsAutumn
Copy link
Copy Markdown
Member

Hi @Yadavanurag13 , Can you please rebase this PR on main?

@yanurag-dev
Copy link
Copy Markdown
Contributor Author

@DevilsAutumn Sure I'll do that.

@yanurag-dev
Copy link
Copy Markdown
Contributor Author

@DevilsAutumn. I have rebased the pr but there was some finding that I have to address and test it out. Once I'll complete this I'll let u know.

@yanurag-dev
Copy link
Copy Markdown
Contributor Author

@CodeRabbit fullreview

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Sep 28, 2025

@Yadavanurag13 I'll conduct a full review of the changes in this PR that adds pagination to the APIs.

✅ Actions performed

Full review triggered.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Sep 28, 2025

Warning

Rate limit exceeded

@Yadavanurag13 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 16 minutes and 35 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between d052166 and 31dc33c.

📒 Files selected for processing (5)
  • backend/djangoindia/api/views/base.py (2 hunks)
  • backend/djangoindia/api/views/event.py (2 hunks)
  • backend/djangoindia/api/views/media_library.py (1 hunks)
  • backend/djangoindia/api/views/partner_and_sponsor.py (1 hunks)
  • backend/djangoindia/settings/base.py (1 hunks)
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add pagination support in APIs

3 participants