def welcome_messages(ar):

    Notification = rt.modules.notifier.Notification
    qs = Notification.objects.filter(user=ar.get_user(), seen__isnull=True)
    if qs.count() > 0:
        chunks = [
            str(_("You have %d unseen notifications: ")) % qs.count()]
        chunks += join_elems([
            ar.obj2html(obj, str(obj.owner)) for obj in qs])
        yield E.span(*chunks)
Yield messages for the welcome page.
dataset/ETHPy150Open lsaffre/lino/lino/modlib/notifier/models.py/welcome_messages