1
0
Fork 1
mirror of https://github.com/coddingtonbear/django-mailbox.git synced 2026-07-10 06:48:19 +02:00

lets try this new method.

This commit is contained in:
Joe 2021-02-01 12:08:09 -05:00
parent 40263b6670
commit 0de5779dd7
4 changed files with 27 additions and 12 deletions

3
.gitignore vendored
View file

@ -13,3 +13,6 @@ dummy_project/*
.tox/
messages
*.sqlite3
manage.py
old/
poetry.lock

View file

@ -31,6 +31,11 @@ class ImapTransport(EmailTransport):
'DJANGO_MAILBOX_INTEGRATION_TESTING_SUBJECT',
None
)
self.delete_message_from_server = getattr(
settings,
'DJANGO_MAILBOX_DELETE_MESSAGE_FROM_SERVER',
True
)
self.hostname = hostname
self.port = port
self.archive = archive
@ -131,7 +136,7 @@ class ImapTransport(EmailTransport):
if self.archive:
self.server.uid('copy', uid, self.archive)
self.server.uid('store', uid, "+FLAGS", "(\\Deleted)")
self.delete_message_from_server:
self.server.uid('store', uid, "+FLAGS", "(\\Deleted)")
self.server.expunge()
return

View file

@ -1,10 +0,0 @@
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "django_mailbox.tests.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)

17
pyproject.toml Normal file
View file

@ -0,0 +1,17 @@
[tool.poetry]
name = "django-ngmailbox"
version = "0.1.0"
description = "I'm forking and making it my own."
authors = ["Joe <joe@sunset-crew.com>"]
[tool.poetry.dependencies]
python = "^3.6"
Django = "^3.1.6"
[tool.poetry.dev-dependencies]
pytest = "^6.2.2"
pytest-django = "^4.1.0"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"