diff --git a/django_mailbox/admin.py b/django_mailbox/admin.py index b74e66c..52849ca 100644 --- a/django_mailbox/admin.py +++ b/django_mailbox/admin.py @@ -65,6 +65,12 @@ class MessageAdmin(admin.ModelAdmin): raw_id_fields = ( 'in_reply_to', ) + exclude = ( + 'body', + ) + readonly_fields = ( + 'text', + ) actions = [resend_message_received_signal] if getattr(settings, 'DJANGO_MAILBOX_ADMIN_ENABLED', True): diff --git a/django_mailbox/models.py b/django_mailbox/models.py index f954f92..5c93351 100755 --- a/django_mailbox/models.py +++ b/django_mailbox/models.py @@ -365,6 +365,10 @@ class Message(models.Model): ) ) + @property + def text(self): + return self.get_text_body() + def get_text_body(self): def get_body_from_message(message): body = '' diff --git a/setup.py b/setup.py index 5d7316e..56a8870 100755 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ tests_require=[ setup( name='django-mailbox', - version='1.10.4', + version='1.10.5', url='http://bitbucket.org/latestrevision/django-mailbox/', description='Import mail from POP3, IMAP, local mailboxes or directly from Postfix or Exim4 into your Django application automatically.', author='Adam Coddington',