8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-23 07:23:46 +00:00

Fallait pas enlever ca

This commit is contained in:
root 2016-11-20 04:39:10 +01:00
parent b0123a0d77
commit cbef3b295b

View file

@ -25,6 +25,13 @@ class ExtensionNameField(serializers.RelatedField):
def to_representation(self, value):
return value.alias
class TypeSerializer(serializers.ModelSerializer):
extension = ExtensionNameField(read_only=True)
class Meta:
model = IpType
fields = ('type', 'extension', 'domaine_ip', 'domaine_range')
class MxSerializer(serializers.ModelSerializer):
name = serializers.SerializerMethodField('get_alias_name')
zone = serializers.SerializerMethodField('get_zone_name')