Browse Source

Affiche les champs TXT et rend field1 facultatif.

dns_bux_fix
Pierre-Elliott Bécue 7 years ago
committed by chirac
parent
commit
887cd473bb
  1. 20
      machines/migrations/0094_auto_20180809_1652.py
  2. 2
      machines/models.py
  3. 2
      machines/templates/machines/aff_txt.html

20
machines/migrations/0094_auto_20180809_1652.py

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2018-08-09 14:52
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('machines', '0093_auto_20180807_1115'),
]
operations = [
migrations.AlterField(
model_name='txt',
name='field1',
field=models.CharField(blank=True, max_length=255),
),
]

2
machines/models.py

@ -786,7 +786,7 @@ class Txt(RevMixin, AclMixin, models.Model):
PRETTY_NAME = "Enregistrement TXT" PRETTY_NAME = "Enregistrement TXT"
zone = models.ForeignKey('Extension', on_delete=models.PROTECT) zone = models.ForeignKey('Extension', on_delete=models.PROTECT)
field1 = models.CharField(max_length=255) field1 = models.CharField(max_length=255, blank=True)
field2 = models.TextField(max_length=2047) field2 = models.TextField(max_length=2047)
class Meta: class Meta:

2
machines/templates/machines/aff_txt.html

@ -34,7 +34,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
{% for txt in text_list %} {% for txt in txt_list %}
<tr> <tr>
<td>{{ txt.zone }}</td> <td>{{ txt.zone }}</td>
<td>{{ txt.dns_entry }}</td> <td>{{ txt.dns_entry }}</td>

Loading…
Cancel
Save