fixes of broken fucntions
This commit is contained in:
@@ -12,6 +12,7 @@ from igny8_core.api.base import SiteSectorModelViewSet
|
||||
from igny8_core.api.pagination import CustomPageNumberPagination
|
||||
from igny8_core.api.response import success_response, error_response
|
||||
from igny8_core.api.throttles import DebugScopedRateThrottle
|
||||
from igny8_core.api.permissions import IsAuthenticatedAndActive, IsViewerOrAbove, IsEditorOrAbove
|
||||
from .models import Keywords, Clusters, ContentIdeas
|
||||
from .serializers import KeywordSerializer, ContentIdeasSerializer
|
||||
from .cluster_serializers import ClusterSerializer
|
||||
@@ -25,7 +26,7 @@ class KeywordViewSet(SiteSectorModelViewSet):
|
||||
"""
|
||||
queryset = Keywords.objects.all()
|
||||
serializer_class = KeywordSerializer
|
||||
permission_classes = [] # Allow any for now
|
||||
permission_classes = [IsAuthenticatedAndActive, IsViewerOrAbove]
|
||||
pagination_class = CustomPageNumberPagination # Explicitly use custom pagination
|
||||
throttle_scope = 'planner'
|
||||
throttle_classes = [DebugScopedRateThrottle]
|
||||
@@ -668,6 +669,7 @@ class ClusterViewSet(SiteSectorModelViewSet):
|
||||
"""
|
||||
queryset = Clusters.objects.all()
|
||||
serializer_class = ClusterSerializer
|
||||
permission_classes = [IsAuthenticatedAndActive, IsViewerOrAbove]
|
||||
pagination_class = CustomPageNumberPagination # Explicitly use custom pagination
|
||||
throttle_scope = 'planner'
|
||||
throttle_classes = [DebugScopedRateThrottle]
|
||||
@@ -957,6 +959,7 @@ class ContentIdeasViewSet(SiteSectorModelViewSet):
|
||||
"""
|
||||
queryset = ContentIdeas.objects.all()
|
||||
serializer_class = ContentIdeasSerializer
|
||||
permission_classes = [IsAuthenticatedAndActive, IsViewerOrAbove]
|
||||
pagination_class = CustomPageNumberPagination
|
||||
throttle_scope = 'planner'
|
||||
throttle_classes = [DebugScopedRateThrottle] # Explicitly use custom pagination
|
||||
|
||||
Reference in New Issue
Block a user