From 6077a773b56472478a03709ad0c4c2d8d5f43419 Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Wed, 15 Nov 2017 03:06:33 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20bug=20sur=20l'edition=20du=20txt=20+=20?= =?UTF-8?q?=C3=A9largi=20le=20champ=20pour=20dnssec?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migrations/0064_auto_20171115_0253.py | 20 +++++++++++++++++++ machines/models.py | 2 +- machines/templates/machines/aff_txt.html | 2 +- machines/urls.py | 2 +- 4 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 machines/migrations/0064_auto_20171115_0253.py diff --git a/machines/migrations/0064_auto_20171115_0253.py b/machines/migrations/0064_auto_20171115_0253.py new file mode 100644 index 00000000..a028e2cb --- /dev/null +++ b/machines/migrations/0064_auto_20171115_0253.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2017-11-15 01:53 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('machines', '0063_auto_20171020_0040'), + ] + + operations = [ + migrations.AlterField( + model_name='text', + name='field2', + field=models.TextField(max_length=2047), + ), + ] diff --git a/machines/models.py b/machines/models.py index c2cd2143..6453f08a 100644 --- a/machines/models.py +++ b/machines/models.py @@ -388,7 +388,7 @@ class Text(models.Model): zone = models.ForeignKey('Extension', on_delete=models.PROTECT) field1 = models.CharField(max_length=255) - field2 = models.CharField(max_length=255) + field2 = models.TextField(max_length=2047) def __str__(self): return str(self.zone) + " : " + str(self.field1) + " " +\ diff --git a/machines/templates/machines/aff_txt.html b/machines/templates/machines/aff_txt.html index fd7c5ee6..eb060440 100644 --- a/machines/templates/machines/aff_txt.html +++ b/machines/templates/machines/aff_txt.html @@ -31,7 +31,7 @@ with this program; if not, write to the Free Software Foundation, Inc., - {% for txt in txt_list %} + {% for txt in text_list %} {{ txt.zone }} {{ txt.dns_entry }} diff --git a/machines/urls.py b/machines/urls.py index 3669b5b9..906fec1c 100644 --- a/machines/urls.py +++ b/machines/urls.py @@ -51,7 +51,7 @@ urlpatterns = [ url(r'^edit_mx/(?P[0-9]+)$', views.edit_mx, name='edit-mx'), url(r'^del_mx/$', views.del_mx, name='del-mx'), url(r'^add_txt/$', views.add_txt, name='add-txt'), - url(r'^edit_txt/(?P[0-9]+)$', views.edit_txt, name='edit-txt'), + url(r'^edit_txt/(?P[0-9]+)$', views.edit_txt, name='edit-txt'), url(r'^del_txt/$', views.del_txt, name='del-txt'), url(r'^add_ns/$', views.add_ns, name='add-ns'), url(r'^edit_ns/(?P[0-9]+)$', views.edit_ns, name='edit-ns'),