summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-07-29 23:34:24 -0500
committerDan McGee <dan@archlinux.org>2011-07-29 23:34:24 -0500
commit0f6c80e9a36bc5770e95543b4374c5ace4383cf5 (patch)
tree2208756e43047b698cf95ceadf0d012d54f6f649
parent2a73675f0ed894d57ed13c5799e988f8d10ccfe2 (diff)
mirrors: do protocol formatting in template
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--mirrors/models.py2
-rw-r--r--templates/mirrors/mirrors.html2
2 files changed, 2 insertions, 2 deletions
diff --git a/mirrors/models.py b/mirrors/models.py
index 4f70e5a9..a8217844 100644
--- a/mirrors/models.py
+++ b/mirrors/models.py
@@ -42,7 +42,7 @@ class Mirror(models.Model):
def supported_protocols(self):
protocols = MirrorProtocol.objects.filter(
urls__mirror=self).order_by('protocol').distinct()
- return ", ".join([p.protocol for p in protocols])
+ return sorted(protocols)
def downstream(self):
return Mirror.objects.filter(upstream=self).order_by('name')
diff --git a/templates/mirrors/mirrors.html b/templates/mirrors/mirrors.html
index 67a678d9..ee76acbe 100644
--- a/templates/mirrors/mirrors.html
+++ b/templates/mirrors/mirrors.html
@@ -28,7 +28,7 @@
<td>{{mirror.get_tier_display}}</td>
<td>{{mirror.country}}</td>
<td>{{mirror.isos|yesno}}</td>
- <td class="wrap">{{mirror.supported_protocols}}</td>
+ <td class="wrap">{{mirror.supported_protocols|join:", "}}</td>
{% if user.is_authenticated %}
<td>{{mirror.public|yesno}}</td>
<td>{{mirror.active|yesno}}</td>