From: Frédéric Péters Date: Mon, 25 May 2015 12:50:02 +0000 (+0200) Subject: create additional label from title X-Git-Tag: v2021~62 X-Git-Url: https://git.0d.be/?p=django-panik-combo.git;a=commitdiff_plain;h=67cd6d0e88e2797e38b7025f7812a4fe8b37eaa8 create additional label from title --- diff --git a/panikombo/models.py b/panikombo/models.py index fd71709..4a6ab48 100644 --- a/panikombo/models.py +++ b/panikombo/models.py @@ -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 ''