hi Joe,

You can declare the exact form field for each of your model property
like,

class ScoreForm(djangoforms.ModelForm):
    opponent = IntegerField(max_value=9, min_value=1)
    class Meta:
        model = Score


Cheemeng

On Feb 23, 5:32 am, joe <huttnif...@gmail.com> wrote:
> Hello to all,
>
> Let's say I have a model and a form for that model:
>
> class Score(db.model):
>     choices = [i for i in range(1,10)]
>     opponent = db.IntegerProperty(choices=choices)
>
> class ScoreForm(djangoforms.ModelForm):
>     class Meta:
>         model = Score
>
> I presume that because the opponent property of Score is a list,
> AppEngine presumes the field should be of the drop-down variety.  (In
> this case, a drop down menu containing the numbers 1-10.)
>
> But what if I want to let the user type in the number, rather than
> selecting from the drop down list.  Is this possible?  More generally,
> how can I override what type of form input AppEngine wants to use when
> forms are rendered with what I want to use?
>
> Thank you for your help.
>
> Sidenote:
>
> I **think** the whole widgets thing in Django might do this, but I
> can't figure out how to get that to jive with AppEngine.  That may not
> even be the right track, though.

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

Reply via email to