nuitdelinfo_2021/people/forms.py

19 lines
481 B
Python
Raw Permalink Normal View History

2021-12-02 23:46:42 +01:00
from django.forms import ModelForm, DateInput
from people.models import People
class DateInput(DateInput):
input_type = "date"
class SubmitPeople(ModelForm):
class Meta:
model = People
fields = ["first_name", "last_name", "title", "description", "birth", "death", "history", "genealogy", "awards",
"pro_life", "testimonials", "sources"]
widgets = {
"birth": DateInput(),
"death": DateInput()
}