From 21fe1460d4a9d9fca913b3bae50f051a78796ffb Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 10 Mar 2010 20:50:29 -0600 Subject: Make the new 'testing' flag on repo a bit clearer Since at least two repositories currently fall under this flag, add some help text and visibility to this column. Signed-off-by: Dan McGee --- main/admin.py | 7 ++++++- main/models.py | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/main/admin.py b/main/admin.py index b42c891f..3ab6d5d4 100644 --- a/main/admin.py +++ b/main/admin.py @@ -68,6 +68,11 @@ class MirrorAdmin(admin.ModelAdmin): MirrorRsyncInlineAdmin, ] +class RepoAdmin(admin.ModelAdmin): + list_display = ('name', 'testing') + list_filter = ('testing',) + search_fields = ('name',) + class PackageAdmin(admin.ModelAdmin): list_display = ('pkgname', 'repo', 'arch', 'maintainer') list_filter = ('repo', 'arch', 'maintainer') @@ -99,7 +104,7 @@ class UserProfileAdmin(UserAdmin): admin.site.register(Package, PackageAdmin) admin.site.register(Press, PressAdmin) admin.site.register(Arch) -admin.site.register(Repo) +admin.site.register(Repo, RepoAdmin) admin.site.register(ExternalProject) # vim: set ts=4 sw=4 et: diff --git a/main/models.py b/main/models.py index fabb8673..d129f4a7 100644 --- a/main/models.py +++ b/main/models.py @@ -161,7 +161,8 @@ class Meta: class Repo(models.Model): id = models.AutoField(primary_key=True) name = models.CharField(max_length=255,unique=True) - testing = models.BooleanField(default=False) + testing = models.BooleanField(default=False, + help_text="Is this repo meant for package testing?") def __unicode__(self): return self.name class Meta: -- cgit v1.2.3-54-g00ecf