mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-23 11:53:12 +00:00
Fallait pas enlever ca
This commit is contained in:
parent
b0123a0d77
commit
cbef3b295b
1 changed files with 7 additions and 0 deletions
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue