create additional label from title
authorFrédéric Péters <fpeters@0d.be>
Mon, 25 May 2015 12:50:02 +0000 (14:50 +0200)
committerFrédéric Péters <fpeters@0d.be>
Mon, 25 May 2015 12:50:02 +0000 (14:50 +0200)
panikombo/models.py

index fd71709..4a6ab48 100644 (file)
@@ -102,6 +102,10 @@ class EpisodeAutoSelectionCell(CellBase):
         from .forms import EpisodeAutoSelectionCellForm
         return EpisodeAutoSelectionCellForm
 
+    def get_additional_label(self):
+        if self.title:
+            return self.title
+        return ''
 
 @register_cell_class
 class NewsItemAutoSelectionCell(CellBase):
@@ -128,3 +132,8 @@ class NewsItemAutoSelectionCell(CellBase):
     def get_default_form_class(self):
         from .forms import NewsItemAutoSelectionCellForm
         return NewsItemAutoSelectionCellForm
+
+    def get_additional_label(self):
+        if self.title:
+            return self.title
+        return ''