mirror of
https://github.com/eduardogsilva/wireguard_webadmin.git
synced 2025-08-02 01:05:15 +02:00
Add EmailSettings model with migration
This commit is contained in:
parent
ea9596b4bc
commit
b7ae6f1421
2 changed files with 45 additions and 1 deletions
|
@ -1,3 +1,16 @@
|
|||
from django.db import models
|
||||
import uuid
|
||||
|
||||
# Create your models here.
|
||||
|
||||
class EmailSettings(models.Model):
|
||||
name = models.CharField(default='email_settings', max_length=20, unique=True)
|
||||
smtp_username = models.CharField(max_length=100, blank=True, null=True)
|
||||
smtp_password = models.CharField(max_length=100, blank=True, null=True)
|
||||
smtp_host = models.CharField(max_length=100, blank=True, null=True)
|
||||
smtp_port = models.IntegerField(default=587)
|
||||
smtp_encryption = models.CharField(default='tls', choices=(('ssl', 'SSL'), ('tls', 'TLS')), max_length=3)
|
||||
smtp_from_address = models.EmailField(blank=True, null=True)
|
||||
|
||||
uuid = models.UUIDField(default=uuid.uuid4, editable=False, unique=True)
|
||||
created = models.DateTimeField(auto_now_add=True)
|
||||
updated = models.DateTimeField(auto_now=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue