From 0f6c80e9a36bc5770e95543b4374c5ace4383cf5 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 29 Jul 2011 23:34:24 -0500 Subject: mirrors: do protocol formatting in template Signed-off-by: Dan McGee --- mirrors/models.py | 2 +- templates/mirrors/mirrors.html | 2 +- 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 @@ def __unicode__(self): 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 @@

Mirror Overview

{{mirror.get_tier_display}} {{mirror.country}} {{mirror.isos|yesno}} - {{mirror.supported_protocols}} + {{mirror.supported_protocols|join:", "}} {% if user.is_authenticated %} {{mirror.public|yesno}} {{mirror.active|yesno}} -- cgit v1.2.3-54-g00ecf