This commit is a rough port to Django 2.1, Python 3 and a Docker based local
development setup. Tests fail/error but migrations and the web frontend are
already runnable. Task queue functionality is untested and translations seem to
have trouble.
This commit adds a test suite for the views defined in
managemails.views. One issue discovered when writing tests is fixed by
checking the request method in CreateMailbox.dispatch.
This commit adds tests for managemails.models to improve the test
coverage of that model. There are some changes to the classes in
managemails.models too:
- add a method create_mailbox to MailboxManager
- properly handle uncommited mailaddresses in MailAddress.set_mailbox
and MailAddress.set_forward_addresses
This commit adds tests for managemails.forms. A refactoring TODO is
added to MailAddressFieldMixin and pragma: no cover has been added to
code paths not reachable if no new constants are added to the
MAILBOX_OR_FORWARDS constant array.
- implement managemails.forms.ChangeMailboxPasswordForm
- extract code for determining hosting package and customer from URL into
HostingPackageAndCustomerMixin
- implement managemails.views.ChangeMailboxPassword
- add new URL pattern 'change_mailbox_password' to managemails.urls
- add template managemails/mailbox_setpassword.html
- link from template hostingpackages/customerhostingpackage_detail.html to
change_mailbox_password
- add german translation for new strings
- document new feature in changelog
- add managemails.apps to give a more meaningful title in the admin site
- add verbose names to MailAddressMailbox fields
- implement managemails.models.Mailbox.get_mailaddresses and a corresponding
property mailaddresses
- add migration to place a unique constraint on MailAddressMailbox.mailaddress
and drop existing primary_key
- change managemails.models.MailAddressMailbox.mailaddress to OneToOneField
- move active flag into managemails.models.ActivateAbleMixin
- refactor Mailbox and Mailaddress to use ActivateAbleMixin
- implement managemails.models.Mailbox.__str__
- add managemails.admin.ActivationChangeMixin to provide activate and
deactivate actions for model admin classes
- add activate and deactivate actions for managemails.admin.MailboxAdmin
- add managemails.admin.MailAddressAdmin and inlines for MailAddressMailbox and
MailAddressForward management on the MailAddress management admin page