summaryrefslogtreecommitdiff
path: root/mirrors/admin.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-02-13 12:34:35 -0600
committerDan McGee <dan@archlinux.org>2012-02-13 12:36:37 -0600
commit3a1101db1d18be2f95342ad8943722eb94ae577e (patch)
tree7399633feb3a406328060833cb6452c7cd67c1b7 /mirrors/admin.py
parentfa6f85f127f5f100f98c0ce130cea2277cd02a0e (diff)
Don't select FTP by default in mirrorlists
More generally, add a new 'default' column to the mirror protocol model so we can determine what is selected and shown by default. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'mirrors/admin.py')
-rw-r--r--mirrors/admin.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/mirrors/admin.py b/mirrors/admin.py
index 3786d8d2..a2b59b41 100644
--- a/mirrors/admin.py
+++ b/mirrors/admin.py
@@ -56,7 +56,9 @@ class MirrorRsyncInlineAdmin(admin.TabularInline):
class MirrorAdminForm(forms.ModelForm):
class Meta:
model = Mirror
- upstream = forms.ModelChoiceField(queryset=Mirror.objects.filter(tier__gte=0, tier__lte=1), required=False)
+ upstream = forms.ModelChoiceField(
+ queryset=Mirror.objects.filter(tier__gte=0, tier__lte=1),
+ required=False)
class MirrorAdmin(admin.ModelAdmin):
form = MirrorAdminForm
@@ -70,8 +72,8 @@ class MirrorAdmin(admin.ModelAdmin):
]
class MirrorProtocolAdmin(admin.ModelAdmin):
- list_display = ('protocol', 'is_download',)
- list_filter = ('is_download',)
+ list_display = ('protocol', 'is_download', 'default')
+ list_filter = ('is_download', 'default')
admin.site.register(Mirror, MirrorAdmin)
admin.site.register(MirrorProtocol, MirrorProtocolAdmin)