1
0
Fork 0

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:
Adam Coddington 2013-06-23 20:27:50 -07:00
parent 548cc66c52
commit 5f289289ce
10 changed files with 525 additions and 126 deletions

View file

@ -70,9 +70,6 @@ class MessageAdmin(admin.ModelAdmin):
raw_id_fields = (
'in_reply_to',
)
exclude = (
'body',
)
readonly_fields = (
'text',
)