mails.models module¶
-
class
mails.models.MailLog(*args, **kwargs)[source]¶ Bases:
django.db.models.base.ModelThe MailLog table is meant as a container of mails. Mails are not directly sent, but added to this table first. Using a cronjob, the unsent messages are eventually sent using the chosen MailBackend.
-
processed¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
status¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
mail_code¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
body¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
body_html¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
to_recipients¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
bcc_recipients¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
from_email¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
subject¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
created¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
latest_activity¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects= <django.db.models.manager.ManagerFromMailLogQuerySet object>¶
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
context¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
get_next_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)¶
-
get_next_by_latest_activity(*, field=<django.db.models.fields.DateTimeField: latest_activity>, is_next=True, **kwargs)¶
-
get_previous_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)¶
-
get_previous_by_latest_activity(*, field=<django.db.models.fields.DateTimeField: latest_activity>, is_next=False, **kwargs)¶
-
get_status_display(*, field=<django.db.models.fields.CharField: status>)¶
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
-
class
mails.models.MailLogRelation(*args, **kwargs)[source]¶ Bases:
django.db.models.base.ModelA template context item for the MailLog in case the a mail has delayed rendering. This may be plain text or any relation within the database.
-
mail¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
name¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
value¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
content_type¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
object_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
content_object¶ Provide a generic many-to-one relation through the
content_typeandobject_idfields.This class also doubles as an accessor to the related object (similar to ForwardManyToOneDescriptor) by adding itself as a model attribute.
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
content_type_id¶
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
mail_id¶
-
objects= <django.db.models.manager.Manager object>¶
-