swh.deposit.api.private.deposit_list module

class swh.deposit.api.private.deposit_list.DefaultPagination[source]

Bases: rest_framework.pagination.PageNumberPagination

page_size = 100
page_size_query_param = 'page_size'
class swh.deposit.api.private.deposit_list.StatusDetailField(*args, **kwargs)[source]

Bases: rest_framework.fields._UnvalidatedField

status_detail field is a dict, we want a simple message instead. So, we reuse the convert_status_detail from deposit_status endpoint to that effect.


Transform the outgoing native value into primitive data.

class swh.deposit.api.private.deposit_list.DepositSerializer(*args, **kwargs)[source]

Bases: rest_framework.serializers.ModelSerializer

class Meta[source]

Bases: object


alias of swh.deposit.models.Deposit

fields = '__all__'
class swh.deposit.api.private.deposit_list.APIList[source]

Bases: rest_framework.generics.ListAPIView, swh.deposit.api.private.APIPrivateView

Deposit request class to list the deposit’s status per page.

HTTP verbs supported: GET


alias of swh.deposit.api.private.deposit_list.DepositSerializer


alias of swh.deposit.api.private.deposit_list.DefaultPagination


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)

config: Dict[str, Any]
scheduler: SchedulerInterface
storage_metadata: StorageInterface