api.v1.views.DatabaseStatsView module

Module with the DatabaseStatsView apiview.

class api.v1.views.DatabaseStatsView.DatabaseStatsView(**kwargs)[source]

Bases: APIView

APIView for the statistics of the database.

NAME = 'stats'
permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>]
serializer_class

alias of DatabaseStatsSerializer

get(request)[source]

Gets all the number of entries in the tables of the database.

Parameters:

request (Request) – The GET request to respond to.

Return type:

Response

Returns:

A dictionary with the count of the table entries.