Working on my first django app, and I have a model defined with some DateFields, and then a ModelForm off of that model i.e.
DateFields
ModelForm
models
I had errors when I compiled the code. Better use this one:
from django import forms
class MyModelForm(forms.ModelForm): class Meta: model = MyModel fields = '__all__' widgets = { 'my_date': forms.DateInput(attrs={'type': 'date'}) }