beat.web.common.mixins module

class beat.web.common.mixins.CommonContextMixin[source]

Bases: object

Apply this mixin to any view or viewset to get the request user in the serializer context optionnaly the request object format

get_serializer_context()[source]
class beat.web.common.mixins.SerializerFieldsMixin[source]

Bases: object

Apply this mixin to any view or viewset to get the list of fields to return

get_serializer_fields(request, allow_sharing=False, exclude_fields=[])[source]