Added DRF files

This commit is contained in:
Fergal Moran
2014-08-27 22:21:48 +01:00
parent 7e66ed9166
commit fecae033e0
6 changed files with 327 additions and 0 deletions

11
api/views.py Normal file
View 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