On Sat, Feb 14, 2009 at 2:28 PM, Rob Hudson <treborhud...@gmail.com> 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.
>
> Any other ways to do this?  Or some examples of #2 to help someone
> along?
>
> Thanks,
> Rob
> >
>
Have you tried using raw_id_fields with it?
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#raw-id-fields

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