refactor: remove user attr from datepicker

since monkey patched get_format already does what we want
This commit is contained in:
Herculino Trotta
2025-01-27 13:25:06 -03:00
parent 3796112d77
commit 187c56c96c
11 changed files with 44 additions and 66 deletions
+2 -4
View File
@@ -72,7 +72,7 @@ class ExchangeRateForm(forms.ModelForm):
model = ExchangeRate
fields = ["from_currency", "to_currency", "rate", "date"]
def __init__(self, *args, user=None, **kwargs):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.helper = FormHelper()
@@ -81,9 +81,7 @@ class ExchangeRateForm(forms.ModelForm):
self.helper.layout = Layout("date", "from_currency", "to_currency", "rate")
self.fields["rate"].widget = ArbitraryDecimalDisplayNumberInput()
self.fields["date"].widget = AirDateTimePickerInput(
clear_button=False, user=user
)
self.fields["date"].widget = AirDateTimePickerInput(clear_button=False)
if self.instance and self.instance.pk:
self.helper.layout.append(