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 unexpected keyword argument 'widget'

Any help would be much appreciated. - Andy

rating_choices = (
    (1, '1'),
    (2, '2'),
    (3, '3'),
    (4, '4'),
    (5, '5'),
)

class Rating(models.Model):
    rating = models.IntegerField(widget=forms.RadioSelect
(choices=rating_choices),label="")

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to