newsletter.models
¶
Module Contents¶
Classes¶
Represents a newsletter before and after it is sent. |
|
Represents a single recipient. |
|
Adds subscription management to a recipient. |
Attributes¶
- class newsletter.models.Newsletter[source]¶
Bases:
onegov.core.orm.Base
,onegov.core.orm.mixins.ContentMixin
,onegov.core.orm.mixins.TimestampMixin
,onegov.search.SearchableContent
Represents a newsletter before and after it is sent.
A newsletter basically consists of a title/subject, a content and a number of recipients. We assume that all newsletters are sent in HTML using onegov.core, which automatically creates a text representation.
- class newsletter.models.Recipient[source]¶
Bases:
onegov.core.orm.Base
,onegov.core.orm.mixins.TimestampMixin
Represents a single recipient.
Recipients may be grouped by any kind of string. Only inside their groups are recipient addresses unique. However, groups are an optional feature and they are not deeply integrated. If you don’t care for group, never use them and the list becomes like a simple list of addresses with no duplicate addresses present.
- property subscription: Subscription[source]¶
- newsletters: relationship[list[Newsletter]][source]¶