On Jun 4, 5:56 am, Ulf Dambacher <[EMAIL PROTECTED]> wrote: > Am Mittwoch, 2. Mai 2007 20:02 schrieb Ulf Dambacher:> Hi > > > I need some kind of widget which can narrow the select by using > > cateogries. But how can this be done in django? > > > Java? Sorry... > > > Ideas, Anyone ? > > Apparently no on e had one. So I created a CategoriezedModelSelectField, see > Ticket 4467.
Sometimes things fall off the radar and you need to bump them back up... :-) If I understand correctly, your want the user to be able to select a name from your model using the category to narrow the potentially large set of names. If that's accurate, then I would use two drop downs. The first being the set of unique categories, the second dynamically populated with the set of names under that category. Choose a category and you get a short list of names. I don't think I'd use Django to do this, I'd probably lean towards a javascript solution. Having the filter operate on the client prevents them from having to roundtrip to the server. Now, if your list of 'names' is ultimately tens of thousands, you won't want to dump all that in the page at once. In that case I would use javascript and an XMLHttpRequest to pull the filtered names from the server, avoiding a page refresh. Either way, I don't think I'd add a new form field. If I did, I'm not sure it would be a Django addition. It seems/feels somewhat application specific in how to handle it. Maybe I'm missing something? doug. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---