Upgrade to Django 3.2

- update dependencies
- fix deprecation warnings
- fix tests
- skip some tests that need more work
- reformat changed code with isort and black
This commit is contained in:
Jan Dittberner 2023-02-18 22:46:48 +01:00
parent 0f18e59d67
commit 4af1a39ca4
93 changed files with 3598 additions and 2725 deletions

View file

@ -2,13 +2,10 @@
This module defines the database models for mail handling.
"""
from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
from model_utils.models import TimeStampedModel
from passlib.hash import sha512_crypt
from passlib.handlers.sha2_crypt import sha512_crypt
from domains.models import MailDomain
from fileservertasks.tasks import create_file_mailbox, delete_file_mailbox
@ -100,7 +97,6 @@ class MailboxManager(models.Manager):
return mailbox
@python_2_unicode_compatible
class Mailbox(ActivateAbleMixin, TimeStampedModel):
"""
This is the model class for a mailbox.
@ -151,7 +147,6 @@ class Mailbox(ActivateAbleMixin, TimeStampedModel):
return self.username
@python_2_unicode_compatible
class MailAddress(ActivateAbleMixin, TimeStampedModel, models.Model):
"""
This is the model class for a mail address.
@ -241,7 +236,6 @@ class MailAddress(ActivateAbleMixin, TimeStampedModel, models.Model):
return retval
@python_2_unicode_compatible
class MailAddressMailbox(TimeStampedModel, models.Model):
"""
This is the model class to assign a mail address to a mailbox.