diff --git a/apps/comment/views/back.py b/apps/comment/views/back.py index bcc889be..aeb6bc61 100644 --- a/apps/comment/views/back.py +++ b/apps/comment/views/back.py @@ -7,7 +7,20 @@ from utils.permissions import IsModerator class CommentLstView(generics.ListCreateAPIView): - """Comment list create view.""" + """ + Comment list create view. + By id, type, object. + + **GET** + ``` + Implement getting Comment list. + ``` + + **POST** + ``` + Implement creating Comment. + ``` + """ def get_queryset(self): from product.models import Product from establishment.models import Establishment @@ -37,7 +50,30 @@ class CommentLstView(generics.ListCreateAPIView): class CommentRUDView(generics.RetrieveUpdateDestroyAPIView): - """Comment RUD view.""" + """ + Comment RUD view. + By id, type, object. + + **GET** + ``` + Implement getting Comment object. + ``` + + **PUT** + ``` + Implement updating Comment. + ``` + + **PATCH** + ``` + Implement partial updating Comment. + ``` + + **DELETE** + ``` + Implement deleting Comment. + ``` + """ serializer_class = CommentBaseSerializer queryset = models.Comment.objects.all() permission_classes = get_permission_classes(IsModerator)