mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 07:53:23 +00:00
17 lines
719 B
Python
17 lines
719 B
Python
from django.contrib.auth.models import AbstractUser
|
|
from django.db import models
|
|
from django.utils.translation import gettext_lazy as _
|
|
from django.conf import settings
|
|
from Establishment.models import Establishment
|
|
|
|
class SMTPSettings(models.Model):
|
|
establishment = models.ForeignKey(Establishment, on_delete=models.CASCADE)
|
|
smtp_server = models.CharField(max_length=255)
|
|
smtp_port = models.PositiveIntegerField()
|
|
smtp_user = models.CharField(max_length=255)
|
|
smtp_password = models.CharField(max_length=255)
|
|
use_tls = models.BooleanField(default=True)
|
|
use_ssl = models.BooleanField(default=False)
|
|
|
|
def __str__(self):
|
|
return f"SMTP Settings ({self.smtp_server}:{self.smtp_port})" |