summaryrefslogtreecommitdiff
path: root/mirrors
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2014-09-01 16:16:44 -0500
committerDan McGee <dan@archlinux.org>2014-09-01 16:16:44 -0500
commita8ceba34299cca271ddf433bf7618aa98e56cc36 (patch)
tree18b60a477ad4d6126823902ce132d86e2954bd32 /mirrors
parent9335d3330b2cee8065cbd46eb71a7ebc50b4b037 (diff)
Add details link to mirror status page
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'mirrors')
-rw-r--r--mirrors/models.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/mirrors/models.py b/mirrors/models.py
index 41132229..e360801b 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):