summaryrefslogtreecommitdiff
path: root/mirrors/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'mirrors/models.py')
-rw-r--r--mirrors/models.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/mirrors/models.py b/mirrors/models.py
index d8d1a3e5..85423303 100644
--- a/mirrors/models.py
+++ b/mirrors/models.py
@@ -31,6 +31,12 @@ class Mirror(models.Model):
urls__mirror=self).order_by('protocol').distinct()
return ", ".join([p.protocol for p in protocols])
+ def downstream(self):
+ return Mirror.objects.filter(upstream=self).order_by('name')
+
+ def get_absolute_url(self):
+ return '/mirrors/%s/' % self.name
+
class MirrorProtocol(models.Model):
protocol = models.CharField(max_length=10, unique=True)
def __unicode__(self):