api.v1.serializers.emailcorrespondent_serializers package¶
api.v1.serializers.emailcorrespondent_serializers package containing serializers for the core.models.EmailCorrespondent bridge table data.
- class api.v1.serializers.emailcorrespondent_serializers.BaseEmailCorrespondentSerializer(*args, **kwargs)[source]¶
Bases:
ModelSerializerThe base serializer for
core.models.EmailCorrespondent.Includes all viable fields from the model. Sets all constraints that must be implemented in all serializers. Other serializers for
core.models.EmailCorrespondentshould inherit from this.- class Meta[source]¶
Bases:
objectMetadata class for the base serializer.
Contains constraints that must be implemented by all serializers. Other serializer metaclasses should inherit from this.
read_only_fieldsmust not be shortened in subclasses.- model¶
alias of
EmailCorrespondent
- _declared_fields = {}¶
- class api.v1.serializers.emailcorrespondent_serializers.CorrespondentEmailSerializer(*args, **kwargs)[source]¶
Bases:
BaseEmailCorrespondentSerializerThe serializer for emails from
core.models.EmailCorrespondent.Used to serialize the emails belonging to a correspondent. Does not include this correspondent.
- email¶
The email is serialized by
api.v1.serializers.SimpleEmailSerializer.
- class Meta[source]¶
Bases:
MetaMetadata class for the serializer.
- fields: ClassVar[list[str]] = ['email', 'mention']¶
Includes only
core.models.EmailCorrespondent.EmailCorrespondent.emailandcore.models.EmailCorrespondent.EmailCorrespondent.mention.
- _declared_fields = {'email': BaseEmailSerializer(read_only=True): id = BigIntegerField(label='ID', read_only=True) is_favorite = BooleanField(label='Favorite status', required=False) created = DateTimeField(label='Time of creation', read_only=True) updated = DateTimeField(label='Time of last update', read_only=True) message_id = CharField(label='Message-ID', read_only=True) datetime = DateTimeField(label='Time received', read_only=True) subject = CharField(read_only=True, style={'base_template': 'textarea.html'}) plain_bodytext = CharField(read_only=True, style={'base_template': 'textarea.html'}) html_bodytext = CharField(label='HTML bodytext', read_only=True, style={'base_template': 'textarea.html'}) datasize = IntegerField(read_only=True) headers = JSONField(allow_null=True, decoder=None, encoder=None, read_only=True, style={'base_template': 'textarea.html'}) x_spam_flag = BooleanField(allow_null=True, label='X-Spam Flag', read_only=True) mailbox = PrimaryKeyRelatedField(read_only=True) in_reply_to = PrimaryKeyRelatedField(allow_empty=False, label='In reply to email', many=True, read_only=True) references = PrimaryKeyRelatedField(allow_empty=False, label='Referencing emails', many=True, read_only=True) correspondents = PrimaryKeyRelatedField(many=True, read_only=True)}¶
- class api.v1.serializers.emailcorrespondent_serializers.EmailCorrespondentSerializer(*args, **kwargs)[source]¶
Bases:
BaseEmailCorrespondentSerializerThe serializer for correspondents from
core.models.EmailCorrespondent.Used to serialize the correspondent belonging to an email. Does not include that email.
- correspondent¶
The correspondent is serialized by
api.v1.serializers.SimpleCorrespondentSerializer.
- class Meta[source]¶
Bases:
MetaMetadata class for the serializer.
- fields: ClassVar[list[str]] = ['correspondent', 'mention']¶
Includes only
core.models.EmailCorrespondent.EmailCorrespondent.correspondentandcore.models.EmailCorrespondent.EmailCorrespondent.mention.
- _declared_fields = {'correspondent': BaseCorrespondentSerializer(read_only=True): id = BigIntegerField(label='ID', read_only=True) is_favorite = BooleanField(label='Favorite status', required=False) created = DateTimeField(label='Time of creation', read_only=True) updated = DateTimeField(label='Time of last update', read_only=True) email_address = CharField(read_only=True) email_name = CharField(help_text='The mailer name of the correspondent.', label='Mailer name', read_only=True, style={'base_template': 'textarea.html'}) real_name = CharField(allow_blank=True, help_text='The real name of the correspondent.', max_length=255, required=False) list_id = CharField(label='List ID', read_only=True, style={'base_template': 'textarea.html'}) list_owner = CharField(read_only=True, style={'base_template': 'textarea.html'}) list_subscribe = CharField(label='List-subscribe', read_only=True, style={'base_template': 'textarea.html'}) list_unsubscribe = CharField(label='List-unsubscribe', read_only=True, style={'base_template': 'textarea.html'}) list_unsubscribe_post = CharField(label='List-unsubscribe method', read_only=True) list_post = CharField(read_only=True, style={'base_template': 'textarea.html'}) list_help = CharField(read_only=True, style={'base_template': 'textarea.html'}) list_archive = CharField(read_only=True, style={'base_template': 'textarea.html'})}¶