api.v1.serializers.account_serializers.AccountSerializer module¶
Module with the AccountSerializer serializer class.
- class api.v1.serializers.account_serializers.AccountSerializer.AccountSerializer(*args, **kwargs)[source]¶
Bases:
BaseAccountSerializerThe standard serializer for a
core.models.Account.Includes a nested serializer for the related field mailboxes.
- _declared_fields = {'mailboxes': BaseMailboxSerializer(many=True, read_only=True): id = BigIntegerField(label='ID', read_only=True) is_favorite = BooleanField(label='Favorite status', required=False) is_healthy = BooleanField(allow_null=True, label='Health status', read_only=True) last_error = CharField(read_only=True, style={'base_template': 'textarea.html'}) last_error_occurred_at = DateTimeField(allow_null=True, label='Time of last error occurrence', read_only=True) created = DateTimeField(label='Time of creation', read_only=True) updated = DateTimeField(label='Time of last update', read_only=True) name = CharField(read_only=True) type = ChoiceField(choices=[('INBOX', 'Inbox'), ('OUTBOX', 'Outbox'), ('SENT', 'Sent'), ('JUNK', 'Junk'), ('DRAFTS', 'Drafts'), ('TRASH', 'Trash'), ('', '')], read_only=True) save_attachments = BooleanField(help_text='Whether the attachments from the emails in this mailbox will be saved.', required=False) save_to_eml = BooleanField(help_text='Whether the emails in this mailbox will be stored in .eml files.', label='Save as .eml', required=False) account = PrimaryKeyRelatedField(read_only=True), 'user': HiddenField(default=CurrentUserDefault())}¶
- mailboxes¶
The mailboxes of the account are serialized by
core.models.MailboxSerializers.BaseMailboxSerializer.BaseMailboxSerializer.