Parcourir la source

Display reverse dns entries with the hostname

Baptiste Jonglez il y a 11 ans
Parent
commit
6891d2e3e0
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      coin/reverse_dns/models.py

+ 2 - 1
coin/reverse_dns/models.py

@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 from django.db import models
 from django.db import models
 from django.core.exceptions import ValidationError
 from django.core.exceptions import ValidationError
 from netfields import InetAddressField, NetManager
 from netfields import InetAddressField, NetManager
@@ -35,4 +36,4 @@ class ReverseDNSEntry(models.Model):
                 raise ValidationError('IP address must be included in the IP subnet.')
                 raise ValidationError('IP address must be included in the IP subnet.')
 
 
     def __unicode__(self):
     def __unicode__(self):
-        return str(self.ip)
+        return u"{} → {}".format(self.ip, self.reverse)