jumpserver/apps/assets/api/asset/host.py

15 lines
378 B
Python
Raw Normal View History

2022-04-06 03:29:16 +00:00
from assets.models import Host
from assets.serializers import HostSerializer
2022-08-22 10:32:33 +00:00
from .asset import AssetViewSet
2022-04-06 03:29:16 +00:00
__all__ = ['HostViewSet']
class HostViewSet(AssetViewSet):
model = Host
def get_serializer_classes(self):
serializer_classes = super().get_serializer_classes()
serializer_classes['default'] = HostSerializer
return serializer_classes