Saturday, February 25, 2012

Re: Is there a orded ModelMultipleChoiceField ?

On Sat, 25 Feb 2012 12:04:18 -0200, Carlos Leite <caduado@gmail.com>
declaimed the following in gmane.comp.python.django.user:

> DId you try to ordered your queryset ?
>
> ... to discover the order the user made the choices, if I understand
> what you want, you have to use some way (ajax), to persist the order
> somewhere.. and then populate your choices filed following the order
> persisted.
>

If order is needed, a multiple choice field is probably not the
solution. Instead a regular drop-down choice box tied to some browser
Javascript to handle the selection.

For each selection made, the Javascript would add that selection to
a list of choices (perhaps displayed in a dynamic area below allowing
the user to remove choices -- but in all cases, this list will be
maintained in the order the user made the choices).
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment