views:

395

answers:

2

I currently have a workable Django admin on the left mockup below but want it to look and function like the one on the right.

alt text

Basically, I'm creating customized menu list every now and then but I have 1000 menu items to choose from. The pain is manually finding the item I want by scrolling through about 1000 items. I'm thinking of associating a search box next to each drop down menu where I can type the item I want and the drop drop list will automatically show me any matches to my keywords.

Is the above easily done with the current Django Admin or does that involve some more customized code from my part? I could use a horizontal filter but I need that sort order field which is associated with each row.

A: 

easiest way - write your own custom widget and connect search field and drop down through js code.

But i think that you trying to get more than contrib.admin can give. contrib.admin is good developer tool, but if you need good custom interface - you should create it yourself.

shiberz
+1  A: 

It sounds like you are describing the raw_id_fields option of admin...

class YourAdmin(admin.ModelAdmin):
    raw_id_fields = ('field1','field2')
T. Stone
I should add the same functionality can be got from filter_horizontal and filter_vertical, except those only work for ManyToMany fields.
T. Stone