summaryrefslogtreecommitdiff
path: root/main/admin.py
diff options
context:
space:
mode:
authorDusty Phillips <buchuki@gmail.com>2008-10-05 21:41:37 -0400
committerDusty Phillips <buchuki@gmail.com>2008-10-05 21:41:37 -0400
commitf583f6aa090199aa6577c1cdc00074f616515410 (patch)
tree7641ec53d8bbfbf522871b58966e2d46624b4277 /main/admin.py
parent7d8feb33708331778e360d7b3cd82a2bcd1c46db (diff)
port admin to django 1.0
Diffstat (limited to 'main/admin.py')
-rw-r--r--main/admin.py38
1 files changed, 38 insertions, 0 deletions
diff --git a/main/admin.py b/main/admin.py
new file mode 100644
index 00000000..8c71d097
--- /dev/null
+++ b/main/admin.py
@@ -0,0 +1,38 @@
+from django.contrib import admin
+from archweb_dev.main.models import (AltForum, Arch, Donor, Mirror, Package, Press, Repo)
+
+class AltForumAdmin(admin.ModelAdmin):
+ list_display = ('language', 'name')
+ list_filter = ('language',)
+ ordering = ['name']
+ search_fields = ('name',)
+
+class DonorAdmin(admin.ModelAdmin):
+ ordering = ['name']
+ search_fields = ('name',)
+
+class MirrorAdmin(admin.ModelAdmin):
+ list_display = ('domain', 'country')
+ list_filter = ('country',)
+ ordering = ['domain']
+ search_fields = ('domain',)
+
+class PackageAdmin(admin.ModelAdmin):
+ list_display = ('pkgname', '_reponame', '_archname', '_maintainername')
+ list_filter = ('repo', 'arch', 'maintainer')
+ ordering = ['pkgname']
+ search_fields = ('pkgname',)
+
+class PressAdmin(admin.ModelAdmin):
+ list_display = ('name', 'url')
+ ordering = ['name']
+ search_fields = ('name',)
+
+
+admin.site.register(AltForum, AltForumAdmin)
+admin.site.register(Donor, DonorAdmin)
+admin.site.register(Mirror, MirrorAdmin)
+admin.site.register(Package, PackageAdmin)
+admin.site.register(Press, PressAdmin)
+admin.site.register(Arch)
+admin.site.register(Repo)