Hello,

I am currently working on a Django app and am quite pleased with the
framework overall.

The problem I am currently having is that the default Django admin
widget for a ManyToMany relationship is a multiple select box.  This is
causing a big problem for me since I have thousands of entries in the
models table for the ManyToMany relationship.  This means that the
admin page is taking 10+ seconds to load, since it is populating the
select list with ALL possible values from the database.

I would like to implement some type of widget that will allow me to use
a pop-up to browse through the objects referred to by the ManyToMany
relationship, only a few at a time, and select/deselect them through
this interface.  I have a pretty decent javascript background and can
use AJAX to do multiple queries for the browsing - the implementation
of the widget is not my concern.  What I don't know how to do is to
instruct Django admin to use my custom javascript widget for the field
in question.  I have looked around a lot and have found lots of
references to editing Manipulators for cases that at first seem like
they could be similar to my own.  However, I haven't found a
satisfactory answer.

I'm thinking that I will need to create my own formfield object and
manipulator, and somehow override the ManyToMany relationship to use
the new formfield type instead of the default SelectField.  Beyond this
general concept, I am stumped.  Has anyone had experience with
something along these lines?  Can anyone give some suggestions?

Any help would be appreciated! :D


--~--~---------~--~----~------------~-------~--~----~
 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