File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 22from rest_framework import permissions
33from rest_framework .serializers import ModelSerializer , ValidationError , \
44 Serializer , CurrentUserDefault
5- from rest_framework .viewsets import ModelViewSet
5+ from rest_framework .mixins import CreateModelMixin
6+ from rest_framework .viewsets import ModelViewSet , GenericViewSet
67from fcm_django .models import FCMDevice
78from django import VERSION as DJ_VERSION
89from django .db .models import Q
@@ -142,5 +143,10 @@ class FCMDeviceViewSet(DeviceViewSetMixin, ModelViewSet):
142143 serializer_class = FCMDeviceSerializer
143144
144145
146+ class FCMDeviceCreateOnlyViewSet (DeviceViewSetMixin , CreateModelMixin , GenericViewSet ):
147+ queryset = FCMDevice .objects .all ()
148+ serializer_class = FCMDeviceSerializer
149+
150+
145151class FCMDeviceAuthorizedViewSet (AuthorizedMixin , FCMDeviceViewSet ):
146152 pass
You can’t perform that action at this time.
0 commit comments