mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 03:13:12 +00:00
TTL for DNAMEs
This commit is contained in:
parent
aab6fa2ba0
commit
13a06c1a67
3 changed files with 26 additions and 0 deletions
20
machines/migrations/0105_dname_ttl.py
Normal file
20
machines/migrations/0105_dname_ttl.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.23 on 2019-10-02 21:47
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('machines', '0104_auto_20191002_2231'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='dname',
|
||||
name='ttl',
|
||||
field=models.PositiveIntegerField(default=172800, verbose_name='Time To Live (TTL)'),
|
||||
),
|
||||
]
|
|
@ -915,6 +915,10 @@ class DName(RevMixin, AclMixin, models.Model):
|
|||
"""A DNAME entry for the DNS."""
|
||||
zone = models.ForeignKey('Extension', on_delete=models.PROTECT)
|
||||
alias = models.CharField(max_length=255)
|
||||
ttl = models.PositiveIntegerField(
|
||||
verbose_name=_("Time To Live (TTL)"),
|
||||
default=172800, # 2 days
|
||||
)
|
||||
|
||||
class Meta:
|
||||
permissions = (
|
||||
|
|
|
@ -29,6 +29,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<tr>
|
||||
<th>{% trans "Target zone" %}</th>
|
||||
<th>{% trans "Record" %}</th>
|
||||
<th>{% trans "TTL" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -36,6 +37,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<tr>
|
||||
<td>{{ dname.zone }}</td>
|
||||
<td>{{ dname.dns_entry }}</td>
|
||||
<td>{{ dname.ttl }}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit dname %}
|
||||
{% include 'buttons/edit.html' with href='machines:edit-dname' id=dname.id %}
|
||||
|
|
Loading…
Reference in a new issue