Notifications Api

class api.notifications.serializers.GetNotificationSerializer(*args, **kwargs)[source]

Bases: ModelSerializer

Get notification serializer

to_representation(instance)[source]

Object instance -> Dict of primitive datatypes.

class api.notifications.views.NotificationAPIView(**kwargs)[source]

Bases: ListAPIView

Notification APIView

get_queryset() QuerySet[source]

Get the list of items for this view. This must be an iterable, and may be a queryset. Defaults to using self.queryset.

This method should always be used rather than accessing self.queryset directly, as self.queryset gets evaluated only once, and those results are cached for all subsequent requests.

You may want to override this if you need to provide different querysets depending on the incoming request.

(Eg. return a list of items that is specific to the user)

pagination_class

alias of LimitOffsetPagination

permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>]
queryset = QuerySet
serializer_class

alias of GetNotificationSerializer

service_class

alias of NotificationService

class api.notifications.views.ReadNotificationAPIView(**kwargs)[source]

Bases: GenericAPIView

permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>]
post(request, *args, **kwargs)[source]
queryset = QuerySet
service_class

alias of NotificationService