summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPyroPeter <abi1789@googlemail.com>2010-10-10 18:49:16 +0200
committerDan McGee <dan@archlinux.org>2010-10-13 18:14:10 -0500
commit670aefbb14065e8f9539755bf58373accbc93c13 (patch)
tree30f4cb1e44eb6fd800bce6ebfaa86ac35e16d95b
parent97d1e4164bf5526c3b63570d27c8377b4dfcac46 (diff)
Add 'All' choice and make it the default
Signed-off-by: PyroPeter <abi1789@googlemail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--mirrors/views.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/mirrors/views.py b/mirrors/views.py
index 24ca0324..d0fe42f9 100644
--- a/mirrors/views.py
+++ b/mirrors/views.py
@@ -22,8 +22,9 @@ class MirrorlistForm(forms.Form):
super(MirrorlistForm, self).__init__(*args, **kwargs)
mirrors = Mirror.objects.filter(active=True).values_list(
'country', flat=True).distinct().order_by('country')
- self.fields['country'].choices = make_choice(mirrors)
- self.fields['country'].initial = ['Any']
+ self.fields['country'].choices = [('all','All')] + make_choice(
+ mirrors)
+ self.fields['country'].initial = ['all']
protos = make_choice(
MirrorProtocol.objects.filter(is_download=True))
self.fields['protocol'].choices = protos