Re: Getting radio boxes with ModelForm

2009-06-08 Thread Alex Gaynor
On Mon, Jun 8, 2009 at 3:55 PM, Andy Dietler wrote: > > Thanks. > > How do I overwrite the definition of rating, like this?: > > class Rating(models.Model): >rating = models.IntegerField() > > > class ShowForm_Rate(forms.ModelForm): >class Meta: >model = Rating >rating = f

Re: Getting radio boxes with ModelForm

2009-06-08 Thread Andy Dietler
Thanks. How do I overwrite the definition of rating, like this?: class Rating(models.Model): rating = models.IntegerField() class ShowForm_Rate(forms.ModelForm): class Meta: model = Rating rating = forms.ChoiceField(widget=forms.RadioSelect (choices=rating_choices),labe

Re: Getting radio boxes with ModelForm

2009-06-08 Thread Daniel Roseman
On Jun 8, 8:23 pm, Andy Dietler wrote: > I'm trying to make one of the fields in my model display radio buttons > with the options 1-5. I can't find a way to do this with a model form > and I can't get anything I find in documentation to work properly. > > What I have below results in me getting

Getting radio boxes with ModelForm

2009-06-08 Thread Andy Dietler
I'm trying to make one of the fields in my model display radio buttons with the options 1-5. I can't find a way to do this with a model form and I can't get anything I find in documentation to work properly. What I have below results in me getting the following error: TypeError: __init__() got an