summaryrefslogtreecommitdiff
path: root/mirrors
diff options
context:
space:
mode:
Diffstat (limited to 'mirrors')
-rw-r--r--mirrors/models.py3
-rw-r--r--mirrors/views.py6
2 files changed, 8 insertions, 1 deletions
diff --git a/mirrors/models.py b/mirrors/models.py
index 5cab9db6..d8d1a3e5 100644
--- a/mirrors/models.py
+++ b/mirrors/models.py
@@ -27,7 +27,8 @@ class Mirror(models.Model):
return self.name
def supported_protocols(self):
- protocols = MirrorProtocol.objects.filter(urls__mirror=self).distinct()
+ protocols = MirrorProtocol.objects.filter(
+ urls__mirror=self).order_by('protocol').distinct()
return ", ".join([p.protocol for p in protocols])
class MirrorProtocol(models.Model):
diff --git a/mirrors/views.py b/mirrors/views.py
index 5c157894..9380f810 100644
--- a/mirrors/views.py
+++ b/mirrors/views.py
@@ -70,6 +70,12 @@ def find_mirrors(request, countries=None, protocols=None, use_status=False):
},
mimetype='text/plain')
+def mirrors(request):
+ mirrors = Mirror.objects.select_related().order_by('tier', 'country')
+ if not request.user.is_authenticated():
+ mirrors = mirrors.filter(public=True, active=True)
+ return direct_to_template(request, 'mirrors/mirrors.html',
+ {'mirror_list': mirrors})
def status(request):
bad_timedelta = datetime.timedelta(days=3)