|
|
@ -50,6 +50,8 @@ class CourseCategoryAPIView(ListAPIView): |
|
|
queryset = CourseCategory.objects.all() |
|
|
queryset = CourseCategory.objects.all() |
|
|
serializer_class = CourseCategorySerializer |
|
|
serializer_class = CourseCategorySerializer |
|
|
pagination_class = StandardResultsSetPagination |
|
|
pagination_class = StandardResultsSetPagination |
|
|
|
|
|
permission_classes = [AllowAny] |
|
|
|
|
|
authentication_classes = [TokenAuthentication] |
|
|
|
|
|
|
|
|
@swagger_auto_schema( |
|
|
@swagger_auto_schema( |
|
|
operation_description=doc_course_category(), |
|
|
operation_description=doc_course_category(), |
|
|
@ -68,6 +70,8 @@ class CourseListAPIView(ListAPIView): |
|
|
filter_backends = [SearchFilter] |
|
|
filter_backends = [SearchFilter] |
|
|
search_fields = ['title', 'category__name', 'professor__fullname'] |
|
|
search_fields = ['title', 'category__name', 'professor__fullname'] |
|
|
pagination_class = StandardResultsSetPagination |
|
|
pagination_class = StandardResultsSetPagination |
|
|
|
|
|
permission_classes = [AllowAny] |
|
|
|
|
|
authentication_classes = [TokenAuthentication] |
|
|
|
|
|
|
|
|
@swagger_auto_schema( |
|
|
@swagger_auto_schema( |
|
|
tags=['Imam-Javad - Course'], |
|
|
tags=['Imam-Javad - Course'], |
|
|
@ -149,6 +153,8 @@ class CourseListAPIView(ListAPIView): |
|
|
class CourseDetailAPIView(RetrieveAPIView): |
|
|
class CourseDetailAPIView(RetrieveAPIView): |
|
|
serializer_class = CourseDetailSerializer |
|
|
serializer_class = CourseDetailSerializer |
|
|
lookup_field = "slug" |
|
|
lookup_field = "slug" |
|
|
|
|
|
permission_classes = [AllowAny] |
|
|
|
|
|
authentication_classes = [TokenAuthentication] |
|
|
|
|
|
|
|
|
@swagger_auto_schema( |
|
|
@swagger_auto_schema( |
|
|
tags=["Imam-Javad - Course"], |
|
|
tags=["Imam-Javad - Course"], |
|
|
@ -268,6 +274,8 @@ class MyCourseListAPIView(ListAPIView): |
|
|
class AttachmentListAPIView(ListAPIView): |
|
|
class AttachmentListAPIView(ListAPIView): |
|
|
serializer_class = CourseAttachmentSerializer |
|
|
serializer_class = CourseAttachmentSerializer |
|
|
pagination_class = StandardResultsSetPagination |
|
|
pagination_class = StandardResultsSetPagination |
|
|
|
|
|
permission_classes = [AllowAny] |
|
|
|
|
|
authentication_classes = [TokenAuthentication] |
|
|
|
|
|
|
|
|
@swagger_auto_schema( |
|
|
@swagger_auto_schema( |
|
|
tags=['Imam-Javad - Course'], |
|
|
tags=['Imam-Javad - Course'], |
|
|
@ -306,6 +314,8 @@ class GlossaryListAPIView(ListAPIView): |
|
|
filter_backends = [SearchFilter] |
|
|
filter_backends = [SearchFilter] |
|
|
search_fields = ['glossary__title', 'glossary__description'] |
|
|
search_fields = ['glossary__title', 'glossary__description'] |
|
|
pagination_class = StandardResultsSetPagination |
|
|
pagination_class = StandardResultsSetPagination |
|
|
|
|
|
permission_classes = [AllowAny] |
|
|
|
|
|
authentication_classes = [TokenAuthentication] |
|
|
|
|
|
|
|
|
@swagger_auto_schema( |
|
|
@swagger_auto_schema( |
|
|
operation_description="Get glossary terms for a specific course", |
|
|
operation_description="Get glossary terms for a specific course", |
|
|
|