diff --git a/docs/changelog.rst b/docs/changelog.rst index 988ee0aa48..0d12c2fba1 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -14,6 +14,7 @@ CHANGELOG - Add rules fixture on sensitive area (#3470) - Change condition on signage & blade to select many of them (#3847) - Allow to set headers in requests from Parsers (#3861) +- Sort bladeType alphabetically #3821 **Documentation** diff --git a/geotrek/signage/migrations/0039_alter_bladetype_options.py b/geotrek/signage/migrations/0039_alter_bladetype_options.py new file mode 100644 index 0000000000..693ed17a01 --- /dev/null +++ b/geotrek/signage/migrations/0039_alter_bladetype_options.py @@ -0,0 +1,17 @@ +# Generated by Django 3.2.21 on 2023-12-21 08:47 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('signage', '0038_auto_20231023_1233'), + ] + + operations = [ + migrations.AlterModelOptions( + name='bladetype', + options={'ordering': ('label',), 'verbose_name': 'Blade type', 'verbose_name_plural': 'Blade types'}, + ), + ] diff --git a/geotrek/signage/models.py b/geotrek/signage/models.py index 5d19f83c9c..ecb34a358b 100755 --- a/geotrek/signage/models.py +++ b/geotrek/signage/models.py @@ -217,6 +217,7 @@ class BladeType(TimeStampedModelMixin, StructureOrNoneRelated): class Meta: verbose_name = _("Blade type") verbose_name_plural = _("Blade types") + ordering = ('label',) def __str__(self): if self.structure: