From c1023bdcbccb0b06ddfe47a46169cbf556e5ea17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Mon, 20 Feb 2023 17:14:43 +0100 Subject: [PATCH] Sort platforms alphabetically on edition form --- games/forms.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/games/forms.py b/games/forms.py index d567aac..1ac0134 100644 --- a/games/forms.py +++ b/games/forms.py @@ -38,6 +38,8 @@ class PurchaseForm(forms.ModelForm): class EditionForm(forms.ModelForm): + platform = forms.ModelChoiceField(queryset=Platform.objects.order_by("name")) + class Meta: model = Edition fields = ["game", "name", "platform", "year_released", "wikidata"]