示例#1
0
def get_num(user):
    if not user.is_authenticated():
        return 0
    return len(BaseNotification.by_receiver(user, read=False, deleted=False))
示例#2
0
def get_num(user):
    if not user.is_authenticated():
        return 0
    return len(BaseNotification.by_receiver(user, read=False, deleted=False))
示例#3
0
def get_notifications(user):
    if not user.is_authenticated():
        return []
    return BaseNotification.by_receiver(user, deleted=False).order_by('-date')
示例#4
0
def get_notifications(user):
    if not user.is_authenticated():
        return []
    return BaseNotification.by_receiver(user, deleted=False).order_by('-date')