diff --git a/nsupdate/main/models.py b/nsupdate/main/models.py index 342f726..bf4bddb 100644 --- a/nsupdate/main/models.py +++ b/nsupdate/main/models.py @@ -138,14 +138,14 @@ class Host(models.Model): return Host.objects.filter( subdomain=splitted[0], domain__domain=splitted[1], **kwargs) - def getIPv4(self): + def get_ipv4(self): try: return dnstools.query_ns(self.get_fqdn(), 'A', origin=self.domain.domain) except (dns.resolver.NXDOMAIN, dns.resolver.NoAnswer, dns.resolver.NoNameservers, dns.resolver.Timeout, dnstools.NameServerNotAvailable): return 'error' - def getIPv6(self): + def get_ipv6(self): try: return dnstools.query_ns(self.get_fqdn(), 'AAAA', origin=self.domain.domain) except (dns.resolver.NXDOMAIN, dns.resolver.NoAnswer, dns.resolver.NoNameservers, dns.resolver.Timeout, diff --git a/nsupdate/main/templates/main/host.html b/nsupdate/main/templates/main/host.html index 1cb34c8..1eafd4c 100644 --- a/nsupdate/main/templates/main/host.html +++ b/nsupdate/main/templates/main/host.html @@ -36,7 +36,7 @@

- +
@@ -44,7 +44,7 @@

- +
diff --git a/nsupdate/main/templates/main/overview.html b/nsupdate/main/templates/main/overview.html index ba4ce5a..b813281 100644 --- a/nsupdate/main/templates/main/overview.html +++ b/nsupdate/main/templates/main/overview.html @@ -10,8 +10,8 @@ {% for host in hosts %} {{ host.subdomain }}.{{ host.domain.domain }} - {{ host.getIPv4 }} ({{ host.last_update_ipv4|timesince }}, {% if not host.ssl_update_ipv4 %}no {% endif %}SSL) - {{ host.getIPv6 }} ({{ host.last_update_ipv6|timesince }}, {% if not host.ssl_update_ipv6 %}no {% endif %}SSL) + {{ host.get_ipv4 }} ({{ host.last_update_ipv4|timesince }}, {% if not host.ssl_update_ipv4 %}no {% endif %}SSL) + {{ host.get_ipv6 }} ({{ host.last_update_ipv6|timesince }}, {% if not host.ssl_update_ipv6 %}no {% endif %}SSL) {{ host.comment }} {% empty %}