From f7763e2e92cddc6cef52e24b98cd33db9ded1115 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Sat, 17 Apr 2021 21:30:37 +0200 Subject: [PATCH] =?UTF-8?q?On=20limite=20=C3=A0=203=20caract=C3=A8res=20la?= =?UTF-8?q?=20taille=20de=20l'abbr=C3=A9viation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../0024_alter_option_abbreviation.py | 20 +++++++++++++++++++ elections/models.py | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 elections/migrations/0024_alter_option_abbreviation.py diff --git a/elections/migrations/0024_alter_option_abbreviation.py b/elections/migrations/0024_alter_option_abbreviation.py new file mode 100644 index 0000000..01e6b22 --- /dev/null +++ b/elections/migrations/0024_alter_option_abbreviation.py @@ -0,0 +1,20 @@ +# Generated by Django 3.2 on 2021-04-17 19:29 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("elections", "0023_option_abbreviation"), + ] + + operations = [ + migrations.AlterField( + model_name="option", + name="abbreviation", + field=models.CharField( + blank=True, max_length=3, verbose_name="abbréviation" + ), + ), + ] diff --git a/elections/models.py b/elections/models.py index 04358f7..bd423d6 100644 --- a/elections/models.py +++ b/elections/models.py @@ -137,7 +137,7 @@ class Option(models.Model): Question, related_name="options", on_delete=models.CASCADE ) text = TranslatedFieldWithFallback(models.TextField(_("texte"), blank=False)) - abbreviation = models.CharField(_("abbréviation"), max_length=8, blank=True) + abbreviation = models.CharField(_("abbréviation"), max_length=3, blank=True) winner = models.BooleanField(_("option gagnante"), default=False) voters = models.ManyToManyField(