summaryrefslogtreecommitdiff
path: root/mirrors/admin.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-09-30 14:20:45 -0500
committerDan McGee <dan@archlinux.org>2010-09-30 14:20:45 -0500
commit3ebe31bdadfcb9c6571b250e53da1f7dd7ebeb66 (patch)
tree3698602e620e63dced2eec3afa85ca305cb7c644 /mirrors/admin.py
parent6eb2ad2e17f86e5fd9e36efd7bc1eeb4910eee15 (diff)
Add is_download field to mirror protocols
This will replace all the usages of '!= rsync' and 'is ftp or http' we have in the code with one check on a boolean flag. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'mirrors/admin.py')
-rw-r--r--mirrors/admin.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/mirrors/admin.py b/mirrors/admin.py
index 394b3508..6990cca2 100644
--- a/mirrors/admin.py
+++ b/mirrors/admin.py
@@ -55,7 +55,11 @@ class MirrorAdmin(admin.ModelAdmin):
MirrorRsyncInlineAdmin,
]
+class MirrorProtocolAdmin(admin.ModelAdmin):
+ list_display = ('protocol', 'is_download',)
+ list_filter = ('is_download',)
+
admin.site.register(Mirror, MirrorAdmin)
-admin.site.register(MirrorProtocol)
+admin.site.register(MirrorProtocol, MirrorProtocolAdmin)
# vim: set ts=4 sw=4 et: