8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-26 00:43:46 +00:00
re2o/machines/serializers.py

17 lines
392 B
Python
Raw Normal View History

2016-11-12 15:12:24 +00:00
#Augustin Lemesle
2016-07-18 21:22:59 +00:00
from rest_framework import serializers
2016-11-12 15:12:24 +00:00
from machines.models import Interface, IpType
2016-07-18 21:22:59 +00:00
class InterfaceSerializer( serializers.ModelSerializer):
class Meta:
model = Interface
fields = ('ipv4', 'mac_address', 'dns', 'type')
2016-07-19 19:43:24 +00:00
2016-11-12 15:12:24 +00:00
class TypeSerializer(serializers.ModelSerializer):
class Meta:
model = IpType
fields = ('type', 'extension')
2016-07-18 21:22:59 +00:00