mirror of
https://github.com/fergalmoran/dss.git
synced 2025-12-27 12:07:54 +00:00
Added DRF files
This commit is contained in:
11
api/views.py
Normal file
11
api/views.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from rest_framework import viewsets
|
||||
from api.serialisers import CommentSerialiser
|
||||
from spa.models.comment import Comment
|
||||
|
||||
|
||||
class CommentViewSet(viewsets.ModelViewSet):
|
||||
"""
|
||||
API endpoint that allows users to be viewed or edited.
|
||||
"""
|
||||
queryset = Comment.objects.all()
|
||||
serializer_class = CommentSerialiser
|
||||
Reference in New Issue
Block a user