feat(api): Enable anonymous read access and server-side pagination for core resources:#58
Merged
AvishkarPatil merged 1 commit intoAvishkarPatil:mainfrom Sep 6, 2025
Conversation
…th docs and tests
Thanks for creating a PR for your Issue!
|
Owner
|
@Sainava Thanks for update |
AvishkarPatil
added a commit
that referenced
this pull request
Sep 6, 2025
- Support new paginated API format from PR #58 - Add safety checks for threads array iteration - Fix forum showing empty after API changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
Enable anonymous read access and server-side pagination for core resources:
Permissions: IsAuthenticatedOrReadOnly for Region, Category, Technique (writes still auth-only).
Visibility: TechniqueViewSet returns all for staff; only is_published=True for others.
Pagination: Global PageNumberPagination via DefaultPagination (page_size=12, page_size query param).
Docs: [API_Documentation.md] updated with “Pagination & Filtering,” query params, examples, and response shape.
Tests: Added APITestCase for anonymous/staff visibility and pagination (including page_size override).
🔗 Related Issue
Fixes #55
🔄 Type of Change
🧪 Testing
📱 Frontend Changes (if applicable)
🔧 Backend Changes (if applicable)
📋 Additional Notes
Optional follow-up: add default ordering in Category/Region Meta to silence pagination warnings.
Frontend should consume results and use next/previous for pagination; no breaking changes to write endpoints.
✅ Checklist
This will be an official contribution for OSCI'25