I've run into this trouble myself. The problem here is the widget
itself. It does exactly what you described:
-Shows all possible values for the ManyToMany field.
-Highlights the "active" or "selected" values. These correspond to
items in that list/array/queryset.
For any more than a couple of values, it's horribly confusing. Even
though I'm used to it, I still find myself assuming that listed values
are selected (especially when you have a few hundred options). It's
just a bad widget for this kind of data.
Take a look at the Admin control panel widgets. Specifically, view a
User in the django control panel and look at the permissions widget.
That's what you want. Something where it shows all available
(unselected) options on one side, all selected options on the other
side, and a way to filter the available options for the ones you
want. Much better than the simple SELECT MULTIPLE="" that is used by
default.
I haven't looked into it, but there may be a way to use that admin
widget for your own forms. This really should be the default widget
anyway.
So bottom line - you need a different widget, maybe one you have to
write yourself. Good luck!
-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 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