Remove formatting of sender in email records admin
This commit is contained in:
parent
cc470ce5fc
commit
72893c7d89
1 changed files with 2 additions and 7 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue