Ejemplo n.º 1
0
def get_notifications(request):
    """ Shows all current notifications """
    result = []
    for k in notifications.keys():
        i = notifications[k]
        if i.get('user') and i.get('user') != request.META.get('remote_user'):
            continue  # Skipt this message if it is meant for someone else
        elif i.get('notification_type') == 'show_once':
            del notifications[k]
            pass
        result.append(i)
    return result
Ejemplo n.º 2
0
def get_notifications(request):
    """ Shows all current notifications """
    result = []
    for k in notifications.keys():
        i = notifications[k]
        if i.get('user') and i.get('user') != request.META.get('remote_user'):
            continue # Skipt this message if it is meant for someone else
        elif i.get('notification_type') == 'show_once':
            del notifications[k]
            pass
        result.append(i)
    return result