【发布时间】:2021-12-28 07:38:51
【问题描述】:
我的问题很直接。我实际上不确定 CreateAPIView 是否需要查询集..?
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
【问题讨论】: