modify pumping form to add start/end/duration

This commit is contained in:
John Merlie 2023-06-16 17:07:00 -04:00 committed by Christopher Charbonneau Wells
parent 3430f2b34f
commit 1391819548
1 changed files with 3 additions and 2 deletions

View File

@ -150,10 +150,11 @@ class TaggableModelForm(forms.ModelForm):
class PumpingForm(CoreModelForm, TaggableModelForm): class PumpingForm(CoreModelForm, TaggableModelForm):
class Meta: class Meta:
model = models.Pumping model = models.Pumping
fields = ["child", "amount", "time", "notes", "tags"] fields = ["child", "start", "end", "amount", "notes", "tags"]
widgets = { widgets = {
"child": ChildRadioSelect, "child": ChildRadioSelect,
"time": DateTimeInput(), "start": DateTimeInput(),
"end": DateTimeInput(),
"notes": forms.Textarea(attrs={"rows": 5}), "notes": forms.Textarea(attrs={"rows": 5}),
} }