Sort form fields alphabetically
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
Fixes #39 Fixes #40
This commit is contained in:
parent
d40612af72
commit
3a3045be91
|
@ -1,3 +1,8 @@
|
|||
## Unreleased
|
||||
|
||||
* Fixed
|
||||
* Sort form fields alphabetically (https://git.kucharczyk.xyz/lukas/timetracker/issues/39, https://git.kucharczyk.xyz/lukas/timetracker/issues/40)
|
||||
|
||||
## 0.2.5 / 2023-01-18 17:01+01:00
|
||||
|
||||
* New
|
||||
|
|
|
@ -4,6 +4,8 @@ from games.models import Game, Platform, Purchase, Session
|
|||
|
||||
|
||||
class SessionForm(forms.ModelForm):
|
||||
purchase = forms.ModelChoiceField(queryset=Purchase.objects.order_by("game__name"))
|
||||
|
||||
class Meta:
|
||||
model = Session
|
||||
fields = [
|
||||
|
@ -16,6 +18,9 @@ class SessionForm(forms.ModelForm):
|
|||
|
||||
|
||||
class PurchaseForm(forms.ModelForm):
|
||||
game = forms.ModelChoiceField(queryset=Game.objects.order_by("name"))
|
||||
platform = forms.ModelChoiceField(queryset=Platform.objects.order_by("name"))
|
||||
|
||||
class Meta:
|
||||
model = Purchase
|
||||
fields = ["game", "platform", "date_purchased", "date_refunded"]
|
||||
|
|
Loading…
Reference in New Issue