summaryrefslogtreecommitdiff
path: root/main/admin.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-09-08 10:50:55 -0500
committerDan McGee <dan@archlinux.org>2010-09-08 10:50:55 -0500
commit5c78ad746942cafa03ed4834eefac98832021558 (patch)
treea6989046fc294ac1f6b0b0d917e562adb26d7e33 /main/admin.py
parente0bf193c555c2a07be2f37defb1270e9a1acb39c (diff)
Add metadata to Arch table
Add a column flagging whether this architecture is agnostic (e.g. 'any') or not. This will remove the hardcoded name checks we have all over the place and replace it with a boolean. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'main/admin.py')
-rw-r--r--main/admin.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/main/admin.py b/main/admin.py
index 923b962e..5dffb431 100644
--- a/main/admin.py
+++ b/main/admin.py
@@ -6,6 +6,11 @@ from main.models import Arch, Donor, Package, Repo, UserProfile
class DonorAdmin(admin.ModelAdmin):
search_fields = ('name',)
+class ArchAdmin(admin.ModelAdmin):
+ list_display = ('name', 'agnostic')
+ list_filter = ('agnostic',)
+ search_fields = ('name',)
+
class RepoAdmin(admin.ModelAdmin):
list_display = ('name', 'testing', 'bugs_project', 'svn_root')
list_filter = ('testing',)
@@ -30,7 +35,7 @@ admin.site.register(User, UserProfileAdmin)
admin.site.register(Donor, DonorAdmin)
admin.site.register(Package, PackageAdmin)
-admin.site.register(Arch)
+admin.site.register(Arch, ArchAdmin)
admin.site.register(Repo, RepoAdmin)
# vim: set ts=4 sw=4 et: