Add clearance viewset for student

This commit is contained in:
Keannu Christian Bernasol 2023-12-22 14:12:10 +08:00
parent 5c8a99675d
commit 372e466744
5 changed files with 56 additions and 9 deletions

View file

@ -15,8 +15,7 @@ class TransactionViewSet(viewsets.ModelViewSet):
class TransactionByStudentViewSet(generics.ListAPIView):
# Only allow GET, POST/CREATE
# Transactions cannot be deleted
# Viewset for GET only
http_method_names = ['get']
permission_classes = [IsAuthenticated, IsStudent]
serializer_class = TransactionSerializer
@ -29,8 +28,7 @@ class TransactionByStudentViewSet(generics.ListAPIView):
class TransactionByTeacherViewSet(generics.ListAPIView):
# Only allow GET, POST/CREATE
# Transactions cannot be deleted
# Viewset for GET only
http_method_names = ['get']
permission_classes = [IsAuthenticated, IsTeacher]
serializer_class = TransactionSerializer