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
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
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
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
4 matches
Mail list logo