1
0
mirror of https://github.com/Damillora/Altessimo synced 2024-11-21 13:37:32 +00:00

Change ordering

This commit is contained in:
Damillora 2020-12-17 15:12:26 +07:00
parent 6b9b0d1458
commit 5205dab431
2 changed files with 18 additions and 1 deletions

View File

@ -0,0 +1,17 @@
# Generated by Django 3.1.4 on 2020-12-17 08:12
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('songs', '0003_auto_20201216_1925'),
]
operations = [
migrations.AlterModelOptions(
name='song',
options={'ordering': ['-branch__acronym', 'romanized_title', 'title']},
),
]

View File

@ -12,7 +12,7 @@ class Song(models.Model):
impression = models.TextField(blank=True)
class Meta:
ordering = [ 'composer__romanized_name','arranger__romanized_name','-branch__acronym','romanized_title','title' ]
ordering = [ '-branch__acronym','romanized_title','title' ]
def __str__(self):
return "["+self.branch.acronym+"] "+self.title