def observation(notification):
msg = ''
if notification.level == 1:
if notification.meta:
msg = _('Goal defined to task realization: %s')%(formats.date_format(notification.meta.astimezone(timezone.get_current_timezone()), "SHORT_DATETIME_FORMAT"))
elif notification.level == 2:
if notification.meta:
if notification.meta < timezone.now():
msg = _('Goal defined to task realization: %s')%(formats.date_format(notification.meta.astimezone(timezone.get_current_timezone()), "SHORT_DATETIME_FORMAT"))
else:
msg = _('New goal defined to task realization: %s')%(formats.date_format(notification.meta.astimezone(timezone.get_current_timezone()), "SHORT_DATETIME_FORMAT"))
return msg
评论列表
文章目录