Yes, I like the idea of a callback that can be overridden. Alex - are you saying this is an ajax solution or a solution that takes place at formset creation time?
Also, in the rendered output for a field, think it would be nice for non-editable fields to have ids associated with them the same way that editable fields have ids. In the ajax usage case - imagine a case where you have a continent field rendered that is *not* editable, and based on some other event (ie, a check box), you then want to send an ajax request to populate the country dropdown to contain all countries in the continent. It is not easy to send the country value as part of an ajax request because its field in the form has no id at all. Margie On May 26, 5:10 pm, Alex Gaynor <alex.gay...@gmail.com> wrote: > On Tue, May 26, 2009 at 7:05 PM, Ulrich Petri <m...@ulo.pe> wrote: > > It is quite possible to refer to the "parent" object without any ajax > > magic (at least in the changeview, but I guess it should be doable for > > the changelist also). > > > I put a short example here: > >http://dpaste.com/hold/48040/ > > > HTH > > Ulrich > > Sure, but that assumes the current value on the model. What Yuri is saying > is if I have a continent and country drop down fields and I select North > America as my continent the country values should be automatically > populated. To me all this says is that there should be a clear callback on > the ModelAdmin for people to override, as well as making sure we POST all > the current form values so we can do the appropriate logic in this function. > > I also have some thoughts about the implementation (JS toolkits, etc...) but > I'll hold onto those since this is just the first prototype. > > 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 developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---