From c2e84a787a4e0b66648f6b8a076a4d25e2289b4d Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 7 Dec 2011 13:11:52 -0600 Subject: Various small admin touchups * Don't capitalize things in verbose_name, Django does this automatically and uses title case * Add overrides for IP, URL, ISO, etc. Signed-off-by: Dan McGee --- mirrors/models.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'mirrors') diff --git a/mirrors/models.py b/mirrors/models.py index a8217844..111654fd 100644 --- a/mirrors/models.py +++ b/mirrors/models.py @@ -28,7 +28,7 @@ class Mirror(models.Model): admin_email = models.EmailField(max_length=255, blank=True) public = models.BooleanField(default=True) active = models.BooleanField(default=True) - isos = models.BooleanField(default=True) + isos = models.BooleanField("ISOs", default=True) rsync_user = models.CharField(max_length=50, blank=True, default='') rsync_password = models.CharField(max_length=50, blank=True, default='') notes = models.TextField(blank=True) @@ -59,11 +59,10 @@ def __unicode__(self): return self.protocol class Meta: - verbose_name = 'Mirror Protocol' ordering = ('protocol',) class MirrorUrl(models.Model): - url = models.CharField(max_length=255, unique=True) + url = models.CharField("URL", max_length=255, unique=True) protocol = models.ForeignKey(MirrorProtocol, related_name="urls", editable=False, on_delete=models.PROTECT) mirror = models.ForeignKey(Mirror, related_name="urls") @@ -108,17 +107,17 @@ def __unicode__(self): return self.url class Meta: - verbose_name = 'Mirror URL' + verbose_name = 'mirror URL' class MirrorRsync(models.Model): - ip = models.CharField(max_length=24) + ip = models.CharField("IP", max_length=24) mirror = models.ForeignKey(Mirror, related_name="rsync_ips") def __unicode__(self): return "%s" % (self.ip) class Meta: - verbose_name = 'Mirror Rsync IP' + verbose_name = 'mirror rsync IP' class MirrorLog(models.Model): url = models.ForeignKey(MirrorUrl, related_name="logs") @@ -132,6 +131,6 @@ def __unicode__(self): return "Check of %s at %s" % (self.url.url, self.check_time) class Meta: - verbose_name = 'Mirror Check Log' + verbose_name = 'mirror check log' # vim: set ts=4 sw=4 et: -- cgit v1.2.3-54-g00ecf