You can use ModelMultipleChoiceField for this:

items =
newforms.ModelMultipleChoiceField(queryset=Items.objects.all())

On Aug 2, 1:24 am, james_027 <[EMAIL PROTECTED]> wrote:
> hi
>
> somewhere on the django documentation I saw the choice provided for
> MultipleSelectField is from a Database but I can't recall where I read
> it but I do it this way, let me know if there are better alternative
>
> items = newforms.MultipleChoiceField(choices = [('i.id', 'i.name') for
> i in Items.objects.all()])
>
> Thanks
> james


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to