On Sat, 2009-02-14 at 11:28 -0800, Rob Hudson wrote: > Hi Django Users, > > I'm setting up a new Django model for a Newsletter app. The > newsletter model has a many to many to a Book model that has about > 20,000 records. This results in a multiple select box that is > unusable for searching/selecting books. > > I have some ideas on what I can do to make this usable but I also > wanted to see if anyone else has had this problem and what they did to > work around it. > > Some ideas with what I imagine are their pros/cons... > > 1) Instead of using a many to many, use a text field that the user > enters a comma separated list of items as lookup strings for the Book > model. Pros: Pretty simple to do. Cons: Opens up potentially lots of > user error by having to type exact strings for the model lookup. > > 2) Override the admin views and templates for adding and editing > Newsletters and use a different widget for selecting books. The > widget could be an AJAX auto complete multiple widget of some sort, as > seen on a lot of sites. Pros: Easier for the user to enter multiple > books using a common web pattern. Cons: I'd say quite a bit more time > consuming to set up.
I'd go with he AJAX widget if you're after maximum usability (and can afford the Javascript dependency). It's not going to be that painful to set up. It's the equivalent of live-search functionality and there are a lot of examples of doing that with AJAX around on the Internet. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---