Don't use a ChoiceField, but do use the select widget.
class TF(forms.Form):
blah=forms.IntegerField(widget=forms.Select(choices=((1,'one'),
(2,'two'))), initial = 2)
post = {'blah': 42}
form = TF(post)
form should validate. It would be up to you to make sure that the
Integer value is in a range you expect though, and you could do that
with a clean_blah() method on the form.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---