From 553030c08ef6c80ccd6554ef63e74d753da507b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Thu, 9 Nov 2023 10:09:32 +0100 Subject: [PATCH] Order devices alphabetically on new session form --- CHANGELOG.md | 1 + games/forms.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f0d3e3..67f5cfd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ ### Improved * game overview: simplify playtime range display +* new session: order devices alphabetically ## 1.3.0 / 2023-11-05 15:09+01:00 diff --git a/games/forms.py b/games/forms.py index 38be10e..6858bfc 100644 --- a/games/forms.py +++ b/games/forms.py @@ -19,6 +19,8 @@ class SessionForm(forms.ModelForm): widget=autofocus_select_widget, ) + device = forms.ModelChoiceField(queryset=Device.objects.order_by("name")) + class Meta: widgets = { "timestamp_start": custom_datetime_widget,