diff --git a/api/management/commands/generate_settings.py b/api/management/commands/generate_settings.py index 6081437..41fd3f9 100644 --- a/api/management/commands/generate_settings.py +++ b/api/management/commands/generate_settings.py @@ -85,6 +85,7 @@ def generate_settings(opt={}): }, 'songs_max_stats': models.Song.objects.order_by('-expert_notes')[0].expert_notes, 'idols': ValuesQuerySetToDict(models.Card.objects.values('name', 'idol__japanese_name').annotate(total=Count('name')).order_by('-idol__main', 'idol__main_unit', '-idol__sub_unit', '-idol__school', 'idol__year', 'idol__name')), + 'main_units': [card['main_unit'] for card in models.Idol.objects.filter(main_unit__isnull=False).values('main_unit').distinct()], 'sub_units': [card['sub_unit'] for card in models.Idol.objects.filter(sub_unit__isnull=False).values('sub_unit').distinct()], 'years': [idol['year'] for idol in models.Idol.objects.filter(year__isnull=False).values('year').distinct()], 'schools': [idol['school'] for idol in models.Idol.objects.filter(school__isnull=False).values('school').distinct()], diff --git a/web/templates/cards.html b/web/templates/cards.html index dca1f43..48c1ed8 100644 --- a/web/templates/cards.html +++ b/web/templates/cards.html @@ -9,6 +9,7 @@