nuitdelinfo_2021/rescue/forms.py

18 lines
419 B
Python
Raw Permalink Normal View History

2021-12-03 00:23:06 +01:00
from django.forms import ModelForm, DateInput
from rescue.models import Rescue
class DateInput(DateInput):
input_type = "date"
class SubmitRescue(ModelForm):
class Meta:
model = Rescue
2021-12-03 04:52:09 +01:00
fields = ["name", "date", "location_long", "location_lat", "resume", "saved", "rescuers", "boats", "description",
2021-12-03 00:23:06 +01:00
"sources"]
widgets = {
"date": DateInput()
}