Commit c8554ac6 authored by klafyvel's avatar klafyvel Committed by chirac

Fix #212

parent d98eb4e0
Pipeline #2184 failed with stage
in 9 seconds
......@@ -381,7 +381,7 @@ class OptionalMachineSerializer(NamespacedHMSerializer):
model = preferences.OptionalMachine
fields = ('password_machine', 'max_lambdauser_interfaces',
'max_lambdauser_aliases', 'ipv6_mode', 'create_machine',
'ipv6')
'ipv6', 'dns_ttl')
class OptionalTopologieSerializer(NamespacedHMSerializer):
......
# -*- coding: utf-8 -*-
# Generated by Django 1.11.23 on 2019-09-20 09:32
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('preferences', '0062_auto_20190910_1909'),
]
operations = [
migrations.AddField(
model_name='optionalmachine',
name='dns_ttl',
field=models.IntegerField(default=86400, verbose_name='Time To Live for DNS records'),
),
]
......@@ -173,6 +173,10 @@ class OptionalMachine(AclMixin, PreferencesModel):
create_machine = models.BooleanField(
default=True
)
dns_ttl = models.IntegerField(
default=86400,
verbose_name=_("Time To Live for DNS records")
)
@cached_property
def ipv6(self):
......
......@@ -183,6 +183,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<tr>
<th>{% trans "Creation of machines" %}</th>
<td>{{ machineoptions.create_machine|tick }}</td>
<th>{% trans "Time To Live for DNS records" %}</th>
<td>{{ machineoptions.dns_ttl }}</td>
</tr>
</table>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment