Started port to Django 2.1, Python 3, Docker
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 is contained in:
parent
adc57657dd
commit
6cebd80c89
48 changed files with 1081 additions and 576 deletions
|
@ -109,7 +109,7 @@ class Mailbox(ActivateAbleMixin, TimeStampedModel):
|
|||
This is the model class for a mailbox.
|
||||
|
||||
"""
|
||||
osuser = models.ForeignKey(OsUser)
|
||||
osuser = models.ForeignKey(OsUser, on_delete=models.CASCADE)
|
||||
username = models.CharField(max_length=128, unique=True)
|
||||
password = models.CharField(max_length=255)
|
||||
|
||||
|
@ -162,7 +162,8 @@ class MailAddress(ActivateAbleMixin, TimeStampedModel, models.Model):
|
|||
|
||||
"""
|
||||
localpart = models.CharField(_('local part'), max_length=128)
|
||||
domain = models.ForeignKey(MailDomain, verbose_name=_('domain'))
|
||||
domain = models.ForeignKey(
|
||||
MailDomain, verbose_name=_('domain'), on_delete=models.CASCADE)
|
||||
|
||||
class Meta:
|
||||
ordering = ['domain', 'localpart']
|
||||
|
@ -250,8 +251,10 @@ class MailAddressMailbox(TimeStampedModel, models.Model):
|
|||
|
||||
"""
|
||||
mailaddress = models.OneToOneField(
|
||||
MailAddress, verbose_name=_('mailaddress'), primary_key=True)
|
||||
mailbox = models.ForeignKey(Mailbox, verbose_name=_('mailbox'))
|
||||
MailAddress, verbose_name=_('mailaddress'), primary_key=True,
|
||||
on_delete=models.CASCADE)
|
||||
mailbox = models.ForeignKey(
|
||||
Mailbox, verbose_name=_('mailbox'), on_delete=models.CASCADE)
|
||||
|
||||
class Meta:
|
||||
unique_together = ('mailaddress', 'mailbox')
|
||||
|
@ -265,7 +268,7 @@ class MailAddressForward(TimeStampedModel, models.Model):
|
|||
This is a model class to map mail addresses to forwarding addresses.
|
||||
|
||||
"""
|
||||
mailaddress = models.ForeignKey(MailAddress)
|
||||
mailaddress = models.ForeignKey(MailAddress, on_delete=models.CASCADE)
|
||||
target = models.EmailField(max_length=254)
|
||||
|
||||
class Meta:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue