beat.web.databases.api module¶
-
beat.web.databases.api.database_to_json(database, request_user, fields_to_return, last_version=None)[source]¶
-
class
beat.web.databases.api.ListCreateDatabasesView(**kwargs)[source]¶ Bases:
beat.web.common.mixins.IsAdminOrReadOnlyMixin,beat.web.common.api.ListCreateBaseViewRead/Write end point that list the database available to a user and allows the creation of new databases only to platform administrator
-
model¶ alias of
beat.web.databases.models.Database
-
serializer_class¶
-
writing_serializer_class¶ alias of
beat.web.databases.serializers.DatabaseCreationSerializer
-
namespace= 'api_databases'¶
-
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)
-