mirror of
https://github.com/coddingtonbear/django-mailbox.git
synced 2026-07-09 22:38:19 +02:00
Move Attachment model up
This commit is contained in:
parent
e3cd913fe7
commit
645a723d09
1 changed files with 4 additions and 4 deletions
|
|
@ -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/')
|
||||
return self.subject
|
||||
Loading…
Add table
Add a link
Reference in a new issue