Example #1
0
 def get_text_for_value(self, value):
     if not value:
         return ''
     if self.choicelist:
         cl = get_choicelist(self.choicelist)
         return cl.get_text_for_value(value)
     l = []
     for v in value.split(MULTIPLE_VALUES_SEP):
         try:
             pc = PropChoice.objects.get(value=v, type=self)
             v = dd.babelattr(pc, 'text')
         except PropChoice.DoesNotExist:
             pass
         l.append(v)
     return ','.join(l)
Example #2
0
 def __unicode__(self):
     return dd.babelattr(self, 'text')
Example #3
0
 def update_cal_summary(self, i):
     if self.every_unit == Recurrencies.once:
         return dd.babelattr(self.event_type, 'event_label')
     return "%s %s" % (dd.babelattr(self.event_type, 'event_label'), i)
Example #4
0
 def update_cal_summary(self, i):
     return "%s %s" % (dd.babelattr(
         self.line.event_type, 'event_label'), i)