notification_filters.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:amadeuslms 作者: amadeusproject 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号