From a8ceba34299cca271ddf433bf7618aa98e56cc36 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 1 Sep 2014 16:16:44 -0500 Subject: Add details link to mirror status page Signed-off-by: Dan McGee --- mirrors/models.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'mirrors') diff --git a/mirrors/models.py b/mirrors/models.py index 4113222..e360801 100644 --- a/mirrors/models.py +++ b/mirrors/models.py @@ -75,6 +75,12 @@ class MirrorUrl(models.Model): created = models.DateTimeField(editable=False) active = models.BooleanField(default=True) + class Meta: + verbose_name = 'mirror URL' + + def __unicode__(self): + return self.url + def address_families(self): hostname = urlparse(self.url).hostname info = socket.getaddrinfo(hostname, None, 0, socket.SOCK_STREAM) @@ -101,11 +107,8 @@ class MirrorUrl(models.Model): self.has_ipv4 = False self.has_ipv6 = False - def __unicode__(self): - return self.url - - class Meta: - verbose_name = 'mirror URL' + def get_absolute_url(self): + return '/mirrors/%s/%d/' % (self.mirror.name, self.pk) class MirrorRsync(models.Model): -- cgit v1.2.3-24-g4f1b