From 645a723d09424b4a7ba547de2ff1b6f0d71d55ff Mon Sep 17 00:00:00 2001 From: Patrick Craston Date: Tue, 15 Jan 2013 12:11:08 +0000 Subject: [PATCH] Move Attachment model up --- django_mailbox/models.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/django_mailbox/models.py b/django_mailbox/models.py index 5f0edaa..0e336dd 100755 --- a/django_mailbox/models.py +++ b/django_mailbox/models.py @@ -216,6 +216,9 @@ class UnreadMessageManager(models.Manager): read=None ) +class MessageAttachment(models.Model): + document = models.FileField(upload_to='mailbox_attachments/%Y/%m/%d/') + class Message(models.Model): mailbox = models.ForeignKey(Mailbox, related_name='messages') subject = models.CharField(max_length=255) @@ -311,7 +314,4 @@ class Message(models.Model): return email.message_from_string(self.body) def __unicode__(self): - return self.subject - -class MessageAttachment(models.Model): - document = models.FileField(upload_to='mailbox_attachments/%Y/%m/%d/') \ No newline at end of file + return self.subject \ No newline at end of file