mirror of
https://github.com/eduardogsilva/wireguard_webadmin.git
synced 2025-08-01 08:44:38 +02:00
DNS settings first commit and static host management
This commit is contained in:
parent
2e8ac8669c
commit
13702c664e
13 changed files with 251 additions and 0 deletions
25
dns/models.py
Normal file
25
dns/models.py
Normal file
|
@ -0,0 +1,25 @@
|
|||
from django.db import models
|
||||
import uuid
|
||||
|
||||
|
||||
class DNSSettings(models.Model):
|
||||
name = models.CharField(default='dns_settings', max_length=100)
|
||||
dns_primary = models.GenericIPAddressField(blank=True, null=True, default='1.1.1.1')
|
||||
dns_secondary = models.GenericIPAddressField(blank=True, null=True, default='1.0.0.1')
|
||||
pending_changes = models.BooleanField(default=True)
|
||||
|
||||
created = models.DateTimeField(auto_now_add=True)
|
||||
updated = models.DateTimeField(auto_now=True)
|
||||
uuid = models.UUIDField(unique=True, default=uuid.uuid4, editable=False)
|
||||
|
||||
|
||||
class StaticHost(models.Model):
|
||||
hostname = models.CharField(max_length=100, unique=True)
|
||||
ip_address = models.GenericIPAddressField()
|
||||
|
||||
created = models.DateTimeField(auto_now_add=True)
|
||||
updated = models.DateTimeField(auto_now=True)
|
||||
uuid = models.UUIDField(unique=True, default=uuid.uuid4, editable=False)
|
||||
|
||||
def __str__(self):
|
||||
return self.hostname
|
Loading…
Add table
Add a link
Reference in a new issue