def format(self): from dudel.filters import date, time, datetime if self.part == DateTimePart.date: return date(self.datetime, ref=self.localization_context) elif self.part == DateTimePart.time: return time(self.datetime, ref=self.localization_context) elif self.part == DateTimePart.datetime: return datetime(self.datetime, ref=self.localization_context)
def title(self): from dudel.filters import date, datetime poll_type = self.poll.type if poll_type == "day": return date(self.date, ref=self.poll) elif poll_type == "date": return datetime(self.date, ref=self.poll.localization_context) else: return '<i class="fa fa-chevron-right choice-separator"></i>'.join(self.get_hierarchy())
def title(self): from dudel.filters import date, datetime from dudel.models.poll import PollType if self.poll.type == PollType.date: return date(self.date, ref=self.poll) elif self.poll.type == PollType.datetime: return datetime(self.date, ref=self.poll.localization_context) else: return Markup('<i class="fa fa-chevron-right choice-separator"></i>').join(self.get_hierarchy())