2022-12-23 11:01:29 +00:00
|
|
|
from assets.models import Database, Asset
|
2022-04-29 10:28:12 +00:00
|
|
|
from assets.serializers import DatabaseSerializer
|
2022-08-23 02:23:48 +00:00
|
|
|
|
2022-08-22 10:32:33 +00:00
|
|
|
from .asset import AssetViewSet
|
2022-04-29 10:28:12 +00:00
|
|
|
|
|
|
|
__all__ = ['DatabaseViewSet']
|
|
|
|
|
|
|
|
|
|
|
|
class DatabaseViewSet(AssetViewSet):
|
|
|
|
model = Database
|
2022-12-23 11:01:29 +00:00
|
|
|
perm_model = Asset
|
2022-04-29 10:28:12 +00:00
|
|
|
|
|
|
|
def get_serializer_classes(self):
|
|
|
|
serializer_classes = super().get_serializer_classes()
|
|
|
|
serializer_classes['default'] = DatabaseSerializer
|
|
|
|
return serializer_classes
|