mirror of https://github.com/snachodog/mybuddy.git
🚨 fixes wrong code styling
This commit is contained in:
parent
d8aa3acf91
commit
94c557d3b8
|
@ -157,8 +157,7 @@ class PumpingForm(CoreModelForm):
|
|||
class DiaperChangeForm(CoreModelForm, TaggableModelForm):
|
||||
class Meta:
|
||||
model = models.DiaperChange
|
||||
fields = ["child", "time", "wet", "solid", "color", "amount", "notes",
|
||||
"tags"]
|
||||
fields = ["child", "time", "wet", "solid", "color", "amount", "notes", "tags"]
|
||||
widgets = {
|
||||
"child": ChildRadioSelect(),
|
||||
"time": forms.DateTimeInput(
|
||||
|
@ -174,8 +173,7 @@ class DiaperChangeForm(CoreModelForm, TaggableModelForm):
|
|||
class FeedingForm(CoreModelForm, TaggableModelForm):
|
||||
class Meta:
|
||||
model = models.Feeding
|
||||
fields = ["child", "start", "end", "type", "method", "amount", "notes",
|
||||
"tags"]
|
||||
fields = ["child", "start", "end", "type", "method", "amount", "notes", "tags"]
|
||||
widgets = {
|
||||
"child": ChildRadioSelect,
|
||||
"start": forms.DateTimeInput(
|
||||
|
@ -205,7 +203,7 @@ class NoteForm(CoreModelForm, TaggableModelForm):
|
|||
"autocomplete": "off",
|
||||
"data-target": "#datetimepicker_time",
|
||||
}
|
||||
)
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
|
@ -248,7 +246,6 @@ class TemperatureForm(CoreModelForm, TaggableModelForm):
|
|||
|
||||
|
||||
class TimerForm(CoreModelForm):
|
||||
|
||||
class Meta:
|
||||
model = models.Timer
|
||||
fields = ["child", "name", "start"]
|
||||
|
@ -259,7 +256,7 @@ class TimerForm(CoreModelForm):
|
|||
"autocomplete": "off",
|
||||
"data-target": "#datetimepicker_start",
|
||||
}
|
||||
)
|
||||
),
|
||||
}
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
|
|
@ -88,8 +88,12 @@ class ChildRadioSelect(RadioSelect):
|
|||
template_name = "core/child_radio.html"
|
||||
option_template_name = "core/child_radio_option.html"
|
||||
|
||||
def create_option(self, name, value, label, selected, index, subindex=None, attrs=None):
|
||||
option = super().create_option(name, value, label, selected, index, subindex, attrs)
|
||||
if value != '':
|
||||
option['picture'] = value.instance.picture
|
||||
def create_option(
|
||||
self, name, value, label, selected, index, subindex=None, attrs=None
|
||||
):
|
||||
option = super().create_option(
|
||||
name, value, label, selected, index, subindex, attrs
|
||||
)
|
||||
if value != "":
|
||||
option["picture"] = value.instance.picture
|
||||
return option
|
||||
|
|
Loading…
Reference in New Issue