fix morceau ordering

This commit is contained in:
Lucie Galland 2022-01-18 15:44:08 +01:00
parent 50f888a07c
commit a7851ff123
2 changed files with 19 additions and 1 deletions

View file

@ -0,0 +1,18 @@
# Generated by Django 2.2.24 on 2022-01-18 14:42
from django.db import migrations
import django.db.models.functions.text
class Migration(migrations.Migration):
dependencies = [
('partitions', '0006_auto_20220118_1525'),
]
operations = [
migrations.AlterModelOptions(
name='partitionset',
options={'ordering': ('category', django.db.models.functions.text.Lower('nom')), 'verbose_name': 'Morceau', 'verbose_name_plural': 'Morceaux'},
),
]

View file

@ -71,7 +71,7 @@ class PartitionSet(models.Model):
class Meta:
verbose_name = _("Morceau")
verbose_name_plural = _("Morceaux")
ordering = (Lower("nom"),)
ordering = ("category",Lower("nom"),)
from datetime import date as ddate