Tuesday, April 25, 2017

RE: SelectDateWidget dosent work

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 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 = ()


 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/48d44fc3-7dff-4d9a-bba9-849106a4f978%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment