On Sun, May 17, 2009 at 11:24 AM, Lokesh <lokeshmarema...@gmail.com> wrote:

>
> Hi Alex,
>
> Then I can go ahead with required=false attribute to avoid form
> validation and validation should be taken care by program.
> Correct me if I am wrong.
>
> Regards,
> Lokesh
>
> > >    incr = 0
> > >    for i in p:
> > >       self[incr] = i.country
> > >       incr = incr+1
> > >    return self.items()
> >
> > > country = forms.CharField(label="cnty",
> > > widget=forms.CheckboxSelectMultiple(choices=country_filler
> > > (country_list)))
> >
> > > Hope the above lines will help you.
> >
> > > Regards,
> > > Lokesh
> >
> > > On May 17, 7:10 pm, Bobby Roberts <tchend...@gmail.com> wrote:
> > > > Hi.  I'm needing to learn how to dynamically pull data out of the
> > > > database and pass it as a CHOICES argument in my form.  I want to
> pull
> > > > a recordset of options, dump it into the choices and pass it to the
> > > > form etc.  Can someone out there lend me a hand?  I'd like the
> options
> > > > on the form to be checkboxes.
> >
> > If you're using choices you really should use a ChoiceField as it will
> > validate that the selections is one of the desired choices, which won't
> be
> > validated with a CharField.
> >
> > Alex
> >
> > --
> > "I disapprove of what you say, but I will defend to the death your right
> to
> > say it." --Voltaire
> > "The people's good is the highest law."--Cicero
> >
>
Yes, if you don't want Django to automatically validate it is a valid choice
you can just do it is a CharField and do it yourself.

Alex

-- 
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cicero

--~--~---------~--~----~------------~-------~--~----~
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