mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2026-01-02 01:47:04 -05:00
feat: Implement initial schema and add various API, service, and management command enhancements across the application.
This commit is contained in:
@@ -14,13 +14,15 @@ class TagViewSet(viewsets.ReadOnlyModelViewSet):
|
||||
permission_classes = [permissions.AllowAny]
|
||||
filter_backends = [filters.SearchFilter]
|
||||
search_fields = ["name"]
|
||||
pagination_class = None # Tags are usually few
|
||||
pagination_class = None # Tags are usually few
|
||||
|
||||
|
||||
class PostViewSet(viewsets.ModelViewSet):
|
||||
"""
|
||||
Public API: Read Only (unless staff).
|
||||
Only published posts unless staff.
|
||||
"""
|
||||
|
||||
permission_classes = [IsStaffOrReadOnly]
|
||||
filter_backends = [DjangoFilterBackend, filters.SearchFilter, filters.OrderingFilter]
|
||||
search_fields = ["title", "excerpt", "content"]
|
||||
|
||||
Reference in New Issue
Block a user