2022-10-20 12:06:58 +00:00
|
|
|
from assets.serializers import DeviceSerializer
|
2022-12-23 11:01:29 +00:00
|
|
|
from assets.models import Device, Asset
|
2022-08-23 02:23:48 +00:00
|
|
|
from .asset import AssetViewSet
|
|
|
|
|
2022-09-15 13:20:56 +00:00
|
|
|
__all__ = ['DeviceViewSet']
|
2022-08-23 02:23:48 +00:00
|
|
|
|
|
|
|
|
2022-09-15 13:20:56 +00:00
|
|
|
class DeviceViewSet(AssetViewSet):
|
|
|
|
model = Device
|
2022-12-23 11:01:29 +00:00
|
|
|
perm_model = Asset
|
2022-08-23 02:23:48 +00:00
|
|
|
|
|
|
|
def get_serializer_classes(self):
|
|
|
|
serializer_classes = super().get_serializer_classes()
|
2022-10-20 12:06:58 +00:00
|
|
|
serializer_classes['default'] = DeviceSerializer
|
2022-08-23 02:23:48 +00:00
|
|
|
return serializer_classes
|