mirror of
https://github.com/coddingtonbear/django-mailbox.git
synced 2026-07-10 06:48: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):
|
def subject(self, msg):
|
||||||
return convert_header_to_unicode(msg.subject)
|
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 = [
|
inlines = [
|
||||||
MessageAttachmentInline,
|
MessageAttachmentInline,
|
||||||
]
|
]
|
||||||
|
|
@ -89,6 +95,7 @@ class MessageAdmin(admin.ModelAdmin):
|
||||||
'in_reply_to',
|
'in_reply_to',
|
||||||
)
|
)
|
||||||
readonly_fields = (
|
readonly_fields = (
|
||||||
|
'envelope_headers',
|
||||||
'text',
|
'text',
|
||||||
'html',
|
'html',
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue