Removed modelview
This commit is contained in:
parent
070a647fdd
commit
3e6e731325
@ -114,48 +114,4 @@ class PendingTerm(APIView):
|
||||
migration_status="Waiting Termination", term_date__lte=timezone.now() + datetime.timedelta(1)
|
||||
)
|
||||
serializer = MigrationOverView(migrations, many=True)
|
||||
return Response(serializer.data)
|
||||
|
||||
# class MigrationViewSet(viewsets.ModelViewSet):
|
||||
# ''' Class for defining the migration views '''
|
||||
# queryset = Migration.objects.all()
|
||||
# serializer_class = MigrationOverView
|
||||
# # permission_classes = (AllowAny,)
|
||||
|
||||
# @action(detail=False, methods=['GET'])
|
||||
# def upcoming(self, request):
|
||||
# ''' Returns a list of the migrations due today '''
|
||||
# queryset = MigrationSerializer(
|
||||
# Migration.objects.filter(booked_time=timezone.now(),
|
||||
# migration_status="Booked"), many=True)
|
||||
# return Response(queryset.data, status=status.HTTP_200_OK)
|
||||
|
||||
# @action(detail=False, methods=['GET'])
|
||||
# def missed(self, request):
|
||||
# ''' Returns a list of the missed migrations (Still have the status
|
||||
# booked and date is greater then today) '''
|
||||
# queryset = MigrationSerializer(
|
||||
# Migration.objects.filter(booked_time__gte=timezone.now() + datetime.timedelta(1),
|
||||
# migration_status="Booked"), many=True)
|
||||
# return Response(queryset.data, status=status.HTTP_200_OK)
|
||||
|
||||
# @action(detail=False, methods=['GET'])
|
||||
# def booked(self, request):
|
||||
# ''' Returns a list of the booked migrations '''
|
||||
# queryset = MigrationSerializer(Migration.objects.filter(
|
||||
# migration_status="Booked",), many=True)
|
||||
# return Response(queryset.data, status=status.HTTP_200_OK)
|
||||
|
||||
# @action(detail=False, methods=['GET'])
|
||||
# def completed(self, request):
|
||||
# ''' Returns a list of the completed migrations '''
|
||||
# queryset = MigrationSerializer(Migration.objects.filter(
|
||||
# migration_status="Completed",), many=True)
|
||||
# return Response(queryset.data, status=status.HTTP_200_OK)
|
||||
|
||||
# @action(detail=False, methods=['GET'])
|
||||
# def awaitterm(self, request):
|
||||
# ''' Returns migrations awaiting termination '''
|
||||
# queryset = MigrationSerializer(Migration.objects.filter(
|
||||
# migration_status="Waiting Termination", term_date__lte=timezone.now()), many=True)
|
||||
# return Response(queryset.data, status=status.HTTP_200_OK)
|
||||
return Response(serializer.data)
|
||||
Reference in New Issue
Block a user