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