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(