beat.web.common.api module¶
-
class
beat.web.common.api.CheckContributionNameView(**kwargs)[source]¶ Bases:
beat.web.common.mixins.CommonContextMixin,rest_framework.generics.CreateAPIView-
serializer_class¶
-
permission_classes= [<class 'rest_framework.permissions.IsAuthenticated'>]¶
-
Bases:
beat.web.common.mixins.CommonContextMixin,rest_framework.generics.CreateAPIViewGet 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)
-
class
beat.web.common.api.ListContributionView(**kwargs)[source]¶ Bases:
beat.web.common.mixins.CommonContextMixin,beat.web.common.mixins.SerializerFieldsMixin,rest_framework.generics.ListAPIView-
model¶ alias of
beat.web.common.models.Contribution
-
serializer_class¶
-
permission_classes= [<class 'rest_framework.permissions.AllowAny'>]¶
-
get_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)
-
-
class
beat.web.common.api.ListCreateBaseView(**kwargs)[source]¶ Bases:
beat.web.common.mixins.CommonContextMixin,beat.web.common.mixins.SerializerFieldsMixin,rest_framework.generics.ListCreateAPIView
-
class
beat.web.common.api.ListCreateContributionView(**kwargs)[source]¶ Bases:
beat.web.common.api.ListCreateBaseView-
permission_classes= [<class 'beat.web.common.permissions.IsAuthorOrReadOnly'>]¶
-
get_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)
-
-
class
beat.web.common.api.DiffView(**kwargs)[source]¶ Bases:
rest_framework.generics.RetrieveAPIView-
model¶ alias of
beat.web.common.models.Versionable
-
serializer_class¶
-
-
class
beat.web.common.api.RetrieveUpdateDestroyContributionView(**kwargs)[source]¶ Bases:
beat.web.common.mixins.CommonContextMixin,beat.web.common.mixins.SerializerFieldsMixin,rest_framework.generics.RetrieveUpdateDestroyAPIView-
model¶ alias of
beat.web.common.models.Contribution
-
permission_classes= [<class 'beat.web.common.permissions.IsAuthorOrReadOnly'>, <class 'beat.web.common.permissions.IsModifiableOrRead'>]¶
-
get_serializer(*args, **kwargs)[source]¶ Return the serializer instance that should be used for validating and deserializing input, and for serializing output.
-