diff options
author | Dusty Phillips <dusty@gerolde.archlinux.org> | 2009-08-12 17:33:42 -0400 |
---|---|---|
committer | Dusty Phillips <dusty@gerolde.archlinux.org> | 2009-08-12 17:33:42 -0400 |
commit | ffeec245afedb79953995cbb02dbe2746d13fc94 (patch) | |
tree | 3f49bc54efbde2df0a6a4438f8f95c3e308e5f87 | |
parent | 6bcf9709f20db8b8e3e40c16b20448f3899f3624 (diff) | |
parent | 88d83dfaa66d6a01621dcff61b441babdf4833ce (diff) |
Merge branch 'master' of /srv/projects/git/archweb_dev
-rw-r--r-- | main/admin.py | 4 | ||||
-rw-r--r-- | main/models.py | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/main/admin.py b/main/admin.py index 20532090..fc482f44 100644 --- a/main/admin.py +++ b/main/admin.py @@ -53,7 +53,7 @@ class MirrorRsyncInlineAdmin(admin.TabularInline): extra = 2 class MirrorAdmin(admin.ModelAdmin): - list_display = ('name', 'country', 'active', 'public', 'isos', 'notes') + list_display = ('name', 'country', 'active', 'public', 'isos', 'notes', 'admin_email', 'supported_protocols') list_filter = ('country', 'active', 'public') ordering = ['country', 'name'] search_fields = ('name',) @@ -79,6 +79,8 @@ class UserProfileInline(admin.StackedInline): class UserProfileAdmin(UserAdmin): inlines = [UserProfileInline] + list_display = ('username', 'email', 'first_name', 'last_name', 'is_staff', 'is_active') + list_filter = ('is_staff', 'is_superuser', 'is_active') admin.site.register(User, UserProfileAdmin) diff --git a/main/models.py b/main/models.py index ebb0368d..580e1eec 100644 --- a/main/models.py +++ b/main/models.py @@ -62,6 +62,10 @@ class Mirror(models.Model): def __unicode__(self): return self.name + def supported_protocols(self): + protocols = MirrorProtocol.objects.filter(urls__mirror=self).distinct() + return ", ".join([p.protocol for p in protocols]) + class MirrorProtocol(models.Model): protocol = models.CharField(max_length=10, unique=True) def __unicode__(self): |