diff options
author | Dan McGee <dan@archlinux.org> | 2010-09-30 14:20:45 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-09-30 14:20:45 -0500 |
commit | 3ebe31bdadfcb9c6571b250e53da1f7dd7ebeb66 (patch) | |
tree | 3698602e620e63dced2eec3afa85ca305cb7c644 /mirrors/admin.py | |
parent | 6eb2ad2e17f86e5fd9e36efd7bc1eeb4910eee15 (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.py | 6 |
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: |