mirror of
https://github.com/eduardogsilva/wireguard_webadmin.git
synced 2026-01-25 16:56:18 +00:00
add routing template field to peer model
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.db import models
|
||||
import uuid
|
||||
|
||||
from django.db import models
|
||||
|
||||
NETMASK_CHOICES = (
|
||||
(8, '/8 (255.0.0.0)'),
|
||||
(9, '/9 (255.128.0.0)'),
|
||||
@@ -82,6 +82,9 @@ class Peer(models.Model):
|
||||
persistent_keepalive = models.IntegerField(default=25)
|
||||
wireguard_instance = models.ForeignKey(WireGuardInstance, on_delete=models.CASCADE)
|
||||
sort_order = models.IntegerField(default=0)
|
||||
routing_template = models.ForeignKey(
|
||||
'routing_templates.RoutingTemplate', on_delete=models.SET_NULL, blank=True, null=True, related_name='peers'
|
||||
)
|
||||
|
||||
created = models.DateTimeField(auto_now_add=True)
|
||||
updated = models.DateTimeField(auto_now=True)
|
||||
|
||||
Reference in New Issue
Block a user