|
|
@ -3,7 +3,7 @@ from rest_framework.response import Response |
|
|
from django.shortcuts import get_object_or_404 |
|
|
from django.shortcuts import get_object_or_404 |
|
|
from utils.pagination import NoPagination |
|
|
from utils.pagination import NoPagination |
|
|
from django.db.models import Q |
|
|
from django.db.models import Q |
|
|
|
|
|
|
|
|
|
|
|
from utils.pagination import StandardResultsSetPagination |
|
|
from ..models import HadisSect, HadisCategory,Hadis |
|
|
from ..models import HadisSect, HadisCategory,Hadis |
|
|
from ..serializers import ( |
|
|
from ..serializers import ( |
|
|
HadisCategorySectListSerializer, |
|
|
HadisCategorySectListSerializer, |
|
|
@ -206,6 +206,7 @@ class HadisCategorySelectBySectView(ListAPIView): |
|
|
Returns the children categories of the specified category (by slug) within the sect_type. |
|
|
Returns the children categories of the specified category (by slug) within the sect_type. |
|
|
""" |
|
|
""" |
|
|
serializer_class = HadisCategorySelectSerializer |
|
|
serializer_class = HadisCategorySelectSerializer |
|
|
|
|
|
pagination_class = StandardResultsSetPagination |
|
|
|
|
|
|
|
|
@categories_tree_by_sect_swagger |
|
|
@categories_tree_by_sect_swagger |
|
|
def get(self, request, *args, **kwargs): |
|
|
def get(self, request, *args, **kwargs): |
|
|
@ -242,7 +243,7 @@ class HadisCategorySelectBySectSourceView(ListAPIView): |
|
|
Returns the children categories of the specified category (by slug) within the sect_type, filtered by source_type. |
|
|
Returns the children categories of the specified category (by slug) within the sect_type, filtered by source_type. |
|
|
""" |
|
|
""" |
|
|
serializer_class = HadisCategorySelectSourceSerializer |
|
|
serializer_class = HadisCategorySelectSourceSerializer |
|
|
|
|
|
|
|
|
|
|
|
pagination_class = StandardResultsSetPagination |
|
|
@categories_tree_by_sect_source_swagger |
|
|
@categories_tree_by_sect_source_swagger |
|
|
def get(self, request, *args, **kwargs): |
|
|
def get(self, request, *args, **kwargs): |
|
|
return self.list(request, *args, **kwargs) |
|
|
return self.list(request, *args, **kwargs) |
|
|
@ -276,7 +277,7 @@ class CategoriesView(ListAPIView): |
|
|
""" |
|
|
""" |
|
|
queryset = HadisCategory.objects.all() |
|
|
queryset = HadisCategory.objects.all() |
|
|
serializer_class = CategorySerializer |
|
|
serializer_class = CategorySerializer |
|
|
|
|
|
|
|
|
|
|
|
pagination_class = StandardResultsSetPagination |
|
|
@categories_list_swagger |
|
|
@categories_list_swagger |
|
|
def get(self, request, *args, **kwargs): |
|
|
def get(self, request, *args, **kwargs): |
|
|
return self.list(request, *args, **kwargs) |
|
|
return self.list(request, *args, **kwargs) |
|
|
|