Re: Missing something obvious? Question about forms

2012-01-18 Thread kenneth gonsalves
On Wed, 2012-01-18 at 09:42 -0500, Jeff Heard wrote: > but there is no "ListField" How is this normally handled? > multiplechoicefield? -- regards Kenneth Gonsalves -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Missing something obvious? Question about forms

2012-01-18 Thread Jeff Heard
There is no presentation layer, actually. I mean, theoretically the forms could be rendered, but I really just want them to validate input data AND.. and this is the kicker, AND I need them to provide default values, which Forms as I understand, don't do, except for presentation. As in, when I

Re: Missing something obvious? Question about forms

2012-01-18 Thread Tom Evans
That would probably do it. You may also need to give it a different widget, I'd guess that a is not how you would present this to the user - although maybe you are just using the form for processing and not to generate a presentation layer. Cheers Tom On Wed, Jan 18, 2012 at 4:01 PM, Jeff

Re: Missing something obvious? Question about forms

2012-01-18 Thread Jeff Heard
Sadly these strings are arbitrary, yes... I suppose I could subclass MultipleChoiceField and kill the validator. On Wed, Jan 18, 2012 at 10:54 AM, Tom Evans wrote: > On Wed, Jan 18, 2012 at 3:51 PM, Andre Terra wrote: > >

Re: Missing something obvious? Question about forms

2012-01-18 Thread Andre Terra
In this case, I think he can subclass it and override the validate method[0] and simply allow any choice to pass, right? Cheers, AT [0] https://code.djangoproject.com/browser/django/trunk/django/forms/fields.py#L780 On Wed, Jan 18, 2012 at 1:54 PM, Tom Evans wrote:

Re: Missing something obvious? Question about forms

2012-01-18 Thread Tom Evans
On Wed, Jan 18, 2012 at 3:51 PM, Andre Terra wrote: > https://docs.djangoproject.com/en/dev/ref/forms/fields/#choicefield > https://docs.djangoproject.com/en/dev/ref/forms/fields/#django.forms.MultipleChoiceField > > That is how I almost replied, but a MultipleChoiceField

Re: Missing something obvious? Question about forms

2012-01-18 Thread Andre Terra
https://docs.djangoproject.com/en/dev/ref/forms/fields/#choicefield https://docs.djangoproject.com/en/dev/ref/forms/fields/#django.forms.MultipleChoiceField Cheers, AT On Wed, Jan 18, 2012 at 12:42 PM, Jeff Heard wrote: > I have a largish API I have to implement

Missing something obvious? Question about forms

2012-01-18 Thread Jeff Heard
I have a largish API I have to implement from a standard, and it requires very complex HTTP processing. I'd like to use django.forms.Form for that, but I can't figure out how to use a form to store a list of parameters. So while my homemade code might be: foo = int(request.get('foo', '1')) bar