Re: birth date in a model form

2009-01-05 Thread DragonSlayre
Oh, cool thanks :) I never went into the code part of djangoproject before, always just the documentation. That's great, thanks. On Jan 6, 12:53 pm, Brot wrote: > from django import forms > from django.forms.extras import widgets > > class FiremanForm(forms.ModelForm): >  

Re: birth date in a model form

2009-01-05 Thread Brot
from django import forms from django.forms.extras import widgets class FiremanForm(forms.ModelForm): birth_date = forms.DateField(widget=widgets.SelectDateWidget()) On Jan 6, 12:11 am, DragonSlayre wrote: > I've tried using it, but I'm still quite new to django - I put

Re: birth date in a model form

2009-01-05 Thread DragonSlayre
I've tried using it, but I'm still quite new to django - I put it into my model file for now, and made my model form looks like this: class FiremanForm(ModelForm): birth_date = models.DateField(widget=SelectDateWidget()) But I get an error "got an unexpected keyword argument 'widget' "

Re: birth date in a model form

2009-01-05 Thread Brot
Hello, I have the same issue in my app and there is a widget. You can find it here: http://code.djangoproject.com/browser/django/trunk/django/forms/extras/widgets.py But for me this widget misses a few features and there are open tickets with patches, but they are not in trunk yet :-(

birth date in a model form

2009-01-05 Thread DragonSlayre
Hi, I've got a ModelForm, and the model for it contains a birth date field (as a DateField): class FiremanForm(ModelForm): class Meta: model = Fireman Currently a single text box is rendered to enter the date, but I'd like to have a drop down list for day, month, year. I'm