Widget should be plural:
widgets ={' birth_date': SelectDateWidget() }
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of kenton Fletcher
Sent: Tuesday, April 25, 2017 3:46 PM
To: Django users
Subject: Re: SelectDateWidget dosent work
This is the
This is the way I use a SelectDateWidget in my forms.py.
from django.forms import ModelForm, SelectDateWidget
class ProfileForm(ModelForm):
class Meta:
widget ={' birth_date': SelectDateWidget() }
model = Member
fields = '__all__'
exclude = ()
--
On Monday 24 April 2017 17:26:20 shahab emami wrote:
> class ProfileForm(ModelForm):
> birth_date= forms.DateField(widget=forms.SelectDateWidget)
> class Meta:
> model = Member
> exclude = ()
>
>
> then i expect a dropdownlist for birth_date in template but it is only
> a
3 matches
Mail list logo