1
0
Fork 1
mirror of https://github.com/coddingtonbear/django-mailbox.git synced 2026-07-09 22:38:19 +02:00

add DJANGO_MAILBOX_MESSAGE_UPLOAD_TO to settings, change utils.get_attachment_save_path to utils.get_save_path, change eml upload_to in model

This commit is contained in:
Ilya Tleukenov 2020-01-31 13:31:04 +07:00
parent 6004a2286f
commit 2824cde5e9
3 changed files with 17 additions and 5 deletions

View file

@ -512,7 +512,7 @@ class Message(models.Model):
eml = models.FileField(
_('Raw message contents'),
null=True,
upload_to="messages",
upload_to=utils.get_save_path(setting='message_upload_to'),
help_text=_('Original full content of message')
)
objects = models.Manager()
@ -752,7 +752,7 @@ class MessageAttachment(models.Model):
document = models.FileField(
_('Document'),
upload_to=utils.get_attachment_save_path,
upload_to=utils.get_save_path(setting='attachment_upload_to'),
)
def delete(self, *args, **kwargs):