forked from mirror/django-mailbox
Major refactor of message attachment handling; no longer stores verbatim
message copy in database. Bumping version number to 2.1 * Walks through incoming message, write attachments to disk as they are found, and alters message body removing actual attachment body, and adding header 'X-Django-Mailbox-Interpolate-Attachment' referencing the ID of the stored attachment. * When calling ``get_email_object``, will walk through stored message, and 're-hydrate' the message by finding said headers, searching for the appropriate record in the MessageAttachments table, and rebuild the message object as closely as possible. Minor fixes: * Properly collect text/plain content from any part of the message; previously would only check the message's first level of payloads, now walks through all payloads, building a string of all text/plain content. * Remove use of deprecated `assertEquals` message.
This commit is contained in:
parent
548cc66c52
commit
5f289289ce
10 changed files with 525 additions and 126 deletions
|
|
@ -70,9 +70,6 @@ class MessageAdmin(admin.ModelAdmin):
|
|||
raw_id_fields = (
|
||||
'in_reply_to',
|
||||
)
|
||||
exclude = (
|
||||
'body',
|
||||
)
|
||||
readonly_fields = (
|
||||
'text',
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue