From a9c71cfbeac18df603293c90548a8e57bfdd502b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Tue, 17 Jan 2012 13:49:44 +0100 Subject: [PATCH] add missing date_str property --- tabellio/documents/question.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tabellio/documents/question.py b/tabellio/documents/question.py index 240763e..6556c9c 100644 --- a/tabellio/documents/question.py +++ b/tabellio/documents/question.py @@ -137,6 +137,12 @@ class Question(Item, BasePublication): else: return '%s (%s)' % (self.questype_str, self.session) + @property + def date_str(self): + if not self.date: + return '' + return self.date.strftime('%d/%m/%Y') + @property def associated_docs(self): docs = []