mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 11:23:10 +00:00
default ttl to 0
This commit is contained in:
parent
13a06c1a67
commit
48ec3d353e
3 changed files with 5 additions and 8 deletions
|
@ -10,14 +10,14 @@ class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('machines', '0102_auto_20190303_1611'),
|
('machines', '0102_auto_20190303_1611'),
|
||||||
('preferences', '0064_optionalmachine_default_dns_ttl'),
|
('preferences', '0066_optionalmachine_default_dns_ttl'),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name='domain',
|
model_name='domain',
|
||||||
name='ttl',
|
name='ttl',
|
||||||
field=models.PositiveIntegerField(default=machines.models.get_default_ttl, verbose_name='Time To Live (TTL)'),
|
field=models.PositiveIntegerField(default=0, verbose_name='Time To Live (TTL)'),
|
||||||
),
|
),
|
||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name='mx',
|
model_name='mx',
|
||||||
|
|
|
@ -1560,10 +1560,6 @@ class Ipv6List(RevMixin, AclMixin, FieldPermissionModelMixin, models.Model):
|
||||||
return str(self.ipv6)
|
return str(self.ipv6)
|
||||||
|
|
||||||
|
|
||||||
def get_default_ttl():
|
|
||||||
return preferences.models.OptionalMachine.get_cached_value('default_dns_ttl')
|
|
||||||
|
|
||||||
|
|
||||||
class Domain(RevMixin, AclMixin, FieldPermissionModelMixin, models.Model):
|
class Domain(RevMixin, AclMixin, FieldPermissionModelMixin, models.Model):
|
||||||
""" Objet domain. Enregistrement A et CNAME en même temps : permet de
|
""" Objet domain. Enregistrement A et CNAME en même temps : permet de
|
||||||
stocker les alias et les nom de machines, suivant si interface_parent
|
stocker les alias et les nom de machines, suivant si interface_parent
|
||||||
|
@ -1588,7 +1584,8 @@ class Domain(RevMixin, AclMixin, FieldPermissionModelMixin, models.Model):
|
||||||
)
|
)
|
||||||
ttl = models.PositiveIntegerField(
|
ttl = models.PositiveIntegerField(
|
||||||
verbose_name=_("Time To Live (TTL)"),
|
verbose_name=_("Time To Live (TTL)"),
|
||||||
default=get_default_ttl
|
default=0 # 0 means that the re2o-service for DNS should retrieve the
|
||||||
|
# default TTL
|
||||||
)
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
|
|
@ -8,7 +8,7 @@ from django.db import migrations, models
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('preferences', '0063_mandate'),
|
('preferences', '0065_auto_20191010_1227'),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
Loading…
Reference in a new issue