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
2016-11-12 16:12:24 +01:00

16 lines
392 B
Python

#Augustin Lemesle
from rest_framework import serializers
from machines.models import Interface, IpType
class InterfaceSerializer( serializers.ModelSerializer):
class Meta:
model = Interface
fields = ('ipv4', 'mac_address', 'dns', 'type')
class TypeSerializer(serializers.ModelSerializer):
class Meta:
model = IpType
fields = ('type', 'extension')