Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More
lino_xl.lib.outbox.mixins¶
Model mixins for lino_xl.lib.outbox
.
Classes
|
Creates an outbox mail and displays it. |
|
Mixin for models that provide a "Post" button. |
|
Mixin for Models that serve as type of a |
- class lino_xl.lib.outbox.mixins.MailableType(*args, **kwargs)¶
Bases:
Model
Mixin for Models that serve as type of a
Mailable
. Concrete examples are cal.EventType, cal.GuestRole, notes.NoteType.- templates_group = None¶
Should contain a string “<app_label>/<Model>” of the Mailable being typed by this MailableType. Example:
class NoteType(..., MailableType): templates_group = 'notes/Note' class Note(..., Mailable): type = dd.ForeignKey(NoteType)
- class lino_xl.lib.outbox.mixins.CreateMail(label=None, **kwargs)¶
Bases:
Action
Creates an outbox mail and displays it.
- get_action_permission(ar, obj, state)¶
This action is not available:
when the user has not email address
on an obj whose MailableType is empty or has no
MailableType.email_template
configured