Module Expr Str ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad NameLoad NameLoad body Expr Str ClassDef bases NameLoad body Assign NameStore Str Assign NameStore Call NameLoad Str Assign NameStore Call NameLoad Str decorator_list Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad Str keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad Str keyword NameLoad FunctionDef arguments args NameParam defaults body Return Call AttributeLoad Call NameLoad Str attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr body Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body If CompareIs NameLoad NameLoad body Return Str Return Call AttributeLoad NameLoad attr NameLoad decorator_list Call AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return Call AttributeLoad Call NameLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr Return Assign NameStore Call NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore BinOpAdd AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BoolOpOr AttributeLoad Call AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Str attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad ListLoad AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call AttributeLoad NameLoad attr decorator_list AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Str keyword Call NameLoad Str ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore Str Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam defaults body If BoolOpAnd CompareIs AttributeLoad NameLoad attr NameLoad CompareEq AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad decorator_list NameLoad decorator_list ClassDef bases NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad decorator_list ClassDef bases NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Call AttributeLoad NameLoad attr keyword NameLoad If CompareGt Call AttributeLoad NameLoad attr Num body Assign NameStore ListLoad BinOpMod Call NameLoad Call NameLoad Str Call AttributeLoad NameLoad attr AugAssignAdd NameStore Call NameLoad ListComp Call AttributeLoad NameLoad attr NameLoad Call NameLoad AttributeLoad NameLoad attr comprehension NameStore NameLoad Expr Yield Call AttributeLoad NameLoad attr NameLoad decorator_list Expr Call AttributeLoad NameLoad attr NameLoad If Call AttributeLoad NameLoad attr Str body ImportFrom alias ClassDef bases NameLoad body Assign NameStore Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Return Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Return Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword AttributeLoad NameLoad attr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list NameLoad decorator_list orelse Assign NameStore NameLoad
N/A N/A Database models for `lino.modlib.notifier`.

A notification is a message to be sent to a given user about a given
database object. Lino


.. xfile:: notifier/body.eml

    The Jinja template to use for generating the body of the
    notification email.

    Available context variables:

    :obj:  The :class:`Notification` object
    :E:    The html namespace :mod:`lino.utils.xmlgen.html`
    :rt:   The runtime API :mod:`lino.api.rt`
    :ar:   The action request which caused the notification. a
           :class:`BaseRequest <lino.core.requests.BaseRequest>`)

 builtins str builtins object django.db models django.conf settings django.utils timezone lino.api dd rt _ lino.core.roles SiteStaff lino.core.gfks gfk2lookup lino.core.requests BaseRequest lino.mixins Created lino.modlib.gfks.mixins Controllable lino.modlib.users.mixins UserAuthored My lino.utils.xmlgen.html E lino.utils join_elems Notification N/A UserAuthored Controllable Created N/A N/A A **notification** object represents the fact that a given user has
    been notified about a given database object.
    
    Use the class method :meth:`notify` to create a new notification
    (and to skip creation in case that user has already been notified
    about that object)

    .. attribute:: message
    
        The message to display. This should be a plain string which
        will be formatted (using standard string format) using the
        following context:

        :obj:  the object attached to this notification
        :user: the user who caused this notification

    .. attribute:: overview

        A display field which returns the parsed :attr:`message`.

     Meta N/A object N/A N/A app_label notifier N/A verbose_name N/A _ Notification N/A verbose_name_plural N/A _ Notifications N/A N/A seen N/A N/A models DateTimeField N/A _ seen null True editable False N/A message N/A N/A models TextField N/A _ Message editable False __str__ N/A N/A self N/A N/A N/A N/A N/A N/A _ About {0} format N/A self owner N/A notify N/A N/A cls ar owner user message N/A N/A N/A Create a notification unless that user has already been notified
        about that object.


         N/A fltkw N/A gfk2lookup N/A cls owner owner N/A qs N/A N/A N/A cls objects filter user user seen__isnull True fltkw N/A N/A N/A N/A qs exists N/A N/A obj N/A cls user user owner owner message message N/A N/A N/A obj full_clean N/A N/A N/A obj save N/A N/A N/A obj send_email ar N/A classmethod overview N/A N/A self ar N/A N/A N/A N/A ar None N/A N/A N/A N/A N/A self get_overview ar N/A N/A N/A dd displayfield get_overview N/A N/A self ar N/A N/A N/A Return the content to be displayed in the :attr:`overview` field.
        On interactive rendererers (extjs, bootstrap3) the `obj` and
        `user` are clickable.

        This is also used from the :xfile:`notifier/body.eml` template
        where they should just be surrounded by **double asterisks**
        so that Thunderbird displays them bold.

         N/A context N/A dict obj N/A N/A ar obj2str N/A self owner user N/A N/A ar obj2str N/A self user N/A N/A N/A N/A _ N/A self message format context N/A send_email N/A N/A self ar N/A N/A N/A N/A N/A N/A self user email N/A N/A N/A N/A N/A dd logger info User %s has no email address N/A self user N/A N/A sar N/A BaseRequest user N/A self user renderer N/A N/A N/A settings SITE kernel text_renderer N/A tpl N/A N/A N/A dd plugins notifier email_subject_template N/A subject N/A N/A tpl format obj self N/A subject N/A N/A settings EMAIL_SUBJECT_PREFIX subject N/A template N/A N/A rt get_template notifier/body.eml N/A context N/A dict obj self E E rt rt ar sar N/A body N/A N/A template render context N/A sender_email N/A N/A N/A N/A ar get_user email N/A settings SERVER_EMAIL N/A sender N/A N/A {0} <{1}> format N/A N/A ar get_user sender_email N/A N/A N/A rt send_email subject sender body N/A N/A N/A self user email N/A N/A N/A dd action N/A N/A dd python_2_unicode_compatible N/A N/A N/A dd update_field Notification user verbose_name N/A _ User Notifications N/A N/A dd Table N/A N/A Shows the gobal list of all notifications.

     N/A model notifier.Notification N/A column_names created overview user seen * N/A detail_layout 
    overview
    notifier.ChangesByNotification
     get_detail_title N/A N/A self ar obj N/A N/A N/A N/A N/A N/A obj seen None N/A N/A obj user N/A N/A ar get_user N/A N/A N/A obj seen N/A N/A timezone now N/A N/A N/A obj save N/A N/A N/A N/A super Notifications self get_detail_title ar obj N/A classmethod N/A AllNotifications N/A Notifications N/A N/A required_roles N/A N/A dd required SiteStaff N/A MyNotifications N/A My Notifications N/A N/A required_roles N/A N/A dd required N/A welcome_messages N/A N/A ar N/A N/A N/A Yield messages for the welcome page. N/A Notification N/A N/A N/A rt modules notifier Notification N/A qs N/A N/A N/A Notification objects filter user N/A N/A ar get_user seen__isnull True N/A N/A N/A N/A qs count 0 N/A N/A chunks N/A N/A N/A str N/A _ You have %d unseen notifications:  N/A N/A qs count N/A chunks N/A join_elems N/A N/A N/A ar obj2html obj N/A str N/A obj owner N/A obj qs N/A N/A N/A N/A E span chunks N/A N/A N/A N/A dd add_welcome_handler welcome_messages N/A N/A N/A dd is_installed changes N/A lino.modlib.changes.models ChangesByMaster ChangesByNotification N/A ChangesByMaster N/A N/A master notifier.Notification get_request_queryset N/A N/A cls ar N/A N/A N/A mi N/A ar master_instance N/A N/A mi None N/A N/A N/A N/A N/A N/A cls model objects none N/A N/A N/A N/A N/A cls model objects filter time__gte N/A mi created N/A gfk2lookup N/A N/A cls model master N/A mi owner N/A classmethod N/A N/A N/A ChangesByNotification None