From 72893c7d89b5aabb8def591d8b07f58c511309ac Mon Sep 17 00:00:00 2001 From: Michael Hall Date: Wed, 16 May 2018 21:48:05 -0400 Subject: [PATCH] Remove formatting of sender in email records admin --- accounts/admin.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/accounts/admin.py b/accounts/admin.py index e85a488..c29decc 100644 --- a/accounts/admin.py +++ b/accounts/admin.py @@ -29,17 +29,12 @@ admin.site.register(EmailConfirmation, ConfirmationAdmin) class EmailAdmin(admin.ModelAdmin): - list_display = ['when', 'recipient_display', 'subject', 'sender_display', 'ok',] + list_display = ['when', 'recipient_display', 'subject', 'sender', 'ok',] list_filter = ['ok', 'when', ('sender', admin.RelatedOnlyFieldListFilter)] readonly_fields = ['when', 'email', 'subject', 'body', 'ok'] search_fields = ['subject', 'body', 'to'] - def sender_display(self, record): - if record.sender is not None: - return record.sender - else: - return 'System' - sender_display.short_description = 'From' + def recipient_display(self, record): if record.recipient is not None: