[Python] do we need query set in CreateAPIView?

Discussão em 'Python' iniciado por Stack, Fevereiro 21, 2025.

  1. Stack

    Stack Membro Participativo

    My question is quite straight forward. I'm actually not sure that queryset is required need for CreateAPIView or not.. ?

    class CreateNotificationAPIView(generics.CreateAPIView):
    """This endpoint allows for creation of a notification"""
    queryset = Notification.objects.all() #can we remove it, if we do so, will we face any issue in future ?
    serializer_class = serializers.NotificationSerializer

    Continue reading...

Compartilhe esta Página