2019-12-19 07:28:17 +00:00
|
|
|
# coding: utf-8
|
|
|
|
#
|
|
|
|
|
|
|
|
from orgs.mixins.api import OrgBulkModelViewSet
|
|
|
|
|
|
|
|
from .. import models
|
|
|
|
from .. import serializers
|
2019-12-27 08:00:32 +00:00
|
|
|
from ..hands import IsOrgAdminOrAppUser
|
2019-12-19 07:28:17 +00:00
|
|
|
|
|
|
|
__all__ = [
|
|
|
|
'DatabaseAppViewSet',
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
class DatabaseAppViewSet(OrgBulkModelViewSet):
|
|
|
|
model = models.DatabaseApp
|
|
|
|
filter_fields = ('name',)
|
|
|
|
search_fields = filter_fields
|
2019-12-27 08:00:32 +00:00
|
|
|
permission_classes = (IsOrgAdminOrAppUser,)
|
2019-12-19 07:28:17 +00:00
|
|
|
serializer_class = serializers.DatabaseAppSerializer
|