]> git.ipfire.org Git - thirdparty/patchwork.git/commit
parsemail: Convert to a management command
authorDaniel Axtens <dja@axtens.net>
Thu, 22 Sep 2016 02:15:09 +0000 (12:15 +1000)
committerStephen Finucane <stephen@that.guru>
Fri, 7 Oct 2016 18:41:26 +0000 (19:41 +0100)
commit2a6022971939fb732570c8b740f411b59ea50b84
treec046286e8a1835512b8edb51e33cde887b566e93
parent61a7843b7a76366b11971df633532da8070e71ee
parsemail: Convert to a management command

Management comands allow applications to register their own actions
with 'manage.py'. This provides some advantages, like automatically
configuring Django (removing the need for 'django.setup' calls) and
removing the need to set the PYTHON_PATH. The 'parsemail' script is a
natural fit for this type of application. Migrate 'parsemail' to a
management command.

This includes some extensive work on logging configuration, as logging
is moved from code into settings. In addition, it removes a lot of the
customizable logging previously introduced in the parsemail command, in
favour of modifications to the settings files.

Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Stephen Finucane <stephen@that.guru>
Partial-bug: #17
Closes-bug: #15
patchwork/bin/parsemail.py [deleted file]
patchwork/bin/parsemail.sh
patchwork/management/commands/parsemail.py [new file with mode: 0644]
patchwork/parser.py
patchwork/settings/base.py
patchwork/tests/__init__.py
patchwork/tests/test_management.py [new file with mode: 0644]
patchwork/tests/test_parser.py
patchwork/tests/utils.py