55from rest_framework .viewsets import ModelViewSet
66from rest_framework .permissions import IsAuthenticated
77from rest_framework .authentication import SessionAuthentication
8- # <<<<<<< HEAD
9- from rest_framework .authentication import SessionAuthentication
10- # =======
118# from rest_framework.authentication import BasicAuthentication
12- # >>>>>>> e1a95461e4b99065c19c192056fad219777692d5
139from django .utils import timezone
1410
1511
16-
1712# Create your views here.
1813
1914class AllPlacementRecords (ModelViewSet ):
2015 authentication_classes = [SessionAuthentication ]
2116 permission_classes = [ WriteByPlacement ]
22- # <<<<<<< HEAD
23- authentication_classes = [SessionAuthentication ]
24- permission_classes = [ WriteByPlacement ]
25- # =======
2617 # authentication_classes =[BasicAuthentication]
2718 # permission_classes =[IsAuthenticated, WriteByPlacement ]
28- # permission_classes =[IsAuthenticated, WriteByPlacement ]
29- # >>>>>>> e1a95461e4b99065c19c192056fad219777692d5
3019 serializer_class = PlacementSerializer
3120 queryset = Placements .objects .all ()
3221
33-
34-
35-
3622class ViewAnnouncement (ModelViewSet ):
3723 # authentication_classes = [BasicAuthentication]
3824 authentication_classes = [SessionAuthentication ]
@@ -50,7 +36,6 @@ class ViewAnnouncement(ModelViewSet):
5036
5137class PastPlacementRecords (ModelViewSet ):
5238 # authentication_classes = [BasicAuthentication]
53-
5439 authentication_classes = [SessionAuthentication ]
5540 permission_classes = [ WriteByPlacement ]
5641 # permission_classes = [IsAuthenticated, WriteByPlacement]
@@ -61,11 +46,8 @@ class PastPlacementRecords(ModelViewSet):
6146
6247class ActivePlacementRecords (ModelViewSet ):
6348 # authentication_classes = [BasicAuthentication]
64- # <<<<<<< HEAD
6549 permission_classes = [ WriteByPlacement ]
6650 authentication_classes = [SessionAuthentication ]
67- # =======
6851 # permission_classes = [IsAuthenticated, WriteByPlacement]
69- # >>>>>>> e1a95461e4b99065c19c192056fad219777692d5
7052 serializer_class = PlacementSerializer
7153 queryset = Placements .objects .filter (date__gt = timezone .now ())
0 commit comments