Пример #1
0
def events_notify(request):
    notifier = NotifierQueue(EventNotification)
    try:
        log = notifier.send_emails(_("You have new alert(s) " "in Network Administrator"), clear_queue=True)
    except NotifierEmptyQueue:
        log = []
    if log:
        response = "<p>Emails sent:</p>%s" % "<br />".join(log)
    else:
        response = "<p>No emails to send</p>"
    return HttpResponse(response)