add docstring for Comment

This commit is contained in:
Александр Пархомин 2020-02-07 12:01:49 +03:00
parent ea25ea7fbd
commit fb3fc25a3d

View File

@ -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)