mirror of
https://github.com/coddingtonbear/django-mailbox.git
synced 2026-07-09 22:38:19 +02:00
Adding envelope headers to the Admin interface.
This commit is contained in:
parent
413c492db3
commit
d276f7e9a9
1 changed files with 7 additions and 0 deletions
|
|
@ -64,6 +64,12 @@ class MessageAdmin(admin.ModelAdmin):
|
|||
def subject(self, msg):
|
||||
return convert_header_to_unicode(msg.subject)
|
||||
|
||||
def envelope_headers(self, msg):
|
||||
email = msg.get_email_object()
|
||||
return '\n'.join(
|
||||
[('%s: %s' % (h, v)) for h, v in email.items()]
|
||||
)
|
||||
|
||||
inlines = [
|
||||
MessageAttachmentInline,
|
||||
]
|
||||
|
|
@ -89,6 +95,7 @@ class MessageAdmin(admin.ModelAdmin):
|
|||
'in_reply_to',
|
||||
)
|
||||
readonly_fields = (
|
||||
'envelope_headers',
|
||||
'text',
|
||||
'html',
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue