summaryrefslogtreecommitdiff
path: root/program/models.py
diff options
context:
space:
mode:
authorErnesto Rico-Schmidt <e.rico.schmidt@gmail.com>2014-02-28 19:49:24 (GMT)
committerErnesto Rico-Schmidt <e.rico.schmidt@gmail.com>2014-02-28 19:49:24 (GMT)
commit6b6050bc2e48d29778e3c256303ae41003760c74 (patch)
tree787b22197b48d515e671fbf51741b627f8476aa0 /program/models.py
parent933050279fa7d79bddf43f071557b067263c2f73 (diff)
added color to broadcast formats
Diffstat (limited to 'program/models.py')
-rw-r--r--program/models.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/program/models.py b/program/models.py
index 5ee4446..9e8fd06 100644
--- a/program/models.py
+++ b/program/models.py
@@ -15,6 +15,7 @@ class BroadcastFormat(models.Model):
format = models.CharField(_("Format"), max_length=32)
slug = models.SlugField(_("Slug"), max_length=32, unique=True)
color = models.CharField(_("Color"), max_length=7, default='#ffffff')
+ text_color = models.CharField(_("Text color"), max_length=7, default='#000000')
enabled = models.BooleanField(_("Enabled"), default=True)
class Meta:
@@ -23,7 +24,7 @@ class BroadcastFormat(models.Model):
verbose_name_plural = _("Broadcast formats")
def admin_color(self):
- return u'<span style="background-color:%s; padding: 0.2em">%s</span>' % (self.color, self.color)
+ return u'<span style="background-color:%s; color: %s padding: 0.2em">%s/%s</span>' % (self.color, self.text_color, self.color, self.text_color)
admin_color.short_description = _("Color")
admin_color.allow_tags = True