summaryrefslogtreecommitdiff
path: root/main/admin.py
diff options
context:
space:
mode:
Diffstat (limited to 'main/admin.py')
-rw-r--r--main/admin.py28
1 files changed, 23 insertions, 5 deletions
diff --git a/main/admin.py b/main/admin.py
index 72de8478..69a5e7da 100644
--- a/main/admin.py
+++ b/main/admin.py
@@ -1,5 +1,6 @@
from django.contrib import admin
-from archweb_dev.main.models import (AltForum, Arch, Donor, Mirror,
+from archweb_dev.main.models import (AltForum, Arch, Donor,
+ Mirror, MirrorProtocol, MirrorUrl, MirrorRsync,
Package, Press, Repo, UserProfile)
from django.contrib.auth.models import User
from django.contrib.auth.admin import UserAdmin
@@ -14,11 +15,23 @@ class DonorAdmin(admin.ModelAdmin):
ordering = ['name']
search_fields = ('name',)
+class MirrorUrlInlineAdmin(admin.TabularInline):
+ model = MirrorUrl
+ extra = 3
+
+class MirrorRsyncInlineAdmin(admin.TabularInline):
+ model = MirrorRsync
+ extra = 2
+
class MirrorAdmin(admin.ModelAdmin):
- list_display = ('domain', 'country')
- list_filter = ('country',)
- ordering = ['domain']
- search_fields = ('domain',)
+ list_display = ('name', 'country', 'active', 'public', 'isos', 'notes')
+ list_filter = ('country', 'active', 'public')
+ ordering = ['country', 'name']
+ search_fields = ('name',)
+ inlines = [
+ MirrorUrlInlineAdmin,
+ MirrorRsyncInlineAdmin,
+ ]
class PackageAdmin(admin.ModelAdmin):
list_display = ('pkgname', '_reponame', '_archname', '_maintainername')
@@ -42,8 +55,13 @@ class UserProfileAdmin(UserAdmin):
admin.site.register(User, UserProfileAdmin)
admin.site.register(AltForum, AltForumAdmin)
admin.site.register(Donor, DonorAdmin)
+
admin.site.register(Mirror, MirrorAdmin)
+admin.site.register(MirrorProtocol)
+
admin.site.register(Package, PackageAdmin)
admin.site.register(Press, PressAdmin)
admin.site.register(Arch)
admin.site.register(Repo)
+
+# vim: set ts=4 sw=4 et: