On 5/10/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > On 5/11/07, Joseph Kocherhans <[EMAIL PROTECTED]> wrote: > > > > On 4/29/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > > > > > I realize that you can subclass the form class returned by the > > > form_for_ methods and delete the fields you don't want, but 'form from > > > field subset' seems like a fairly common use case that can be very > > > easily accommodated. > > > > +1. I'm planning on adding a similar argument to edit-inline. Writing > > a one-off formfield_callback seems like an awful lot of work for such > > a common task. I'm sure the same thing could be implemented as a > > wrapper around the form_for_ functions using formfield_callback, but I > > don't see any particular reason to do it that way as long as the > > behavior of the 'fields' argument was documented as Malcolm said. > > I've got a working implementation and some proof-of-concept tests; > would you like me to clean this up and push it into the trunk, or do > you want to handle it yourself?
If you want to add it to the trunk that would be awesome. I can just merge the changes into the newforms-admin branch. It's overdue for a merge anyhow. > > > 2) I realize that there are historical (i.e., > > > manipulator/pre-magic-removal related) reasons why reverse ForeignKey > > > and M2M relations are not contained on forms, but is there any reason > > > that newforms should continue the tradition? > > > > > +1 for optionally doing this for ManyToManyField at least. Would the > > reverse ForeignKey interface be similar to edit_inline? I think once I > > finish the formset-model integration code, that should be pretty > > simple to pull off. > > I would have thought reverse foreign key would have be more like m2m > than edit inline. The reverse case is more like 'which of these > objects are have FK relations pointing to this one?', so a 'select > multiple' widget would be appropriate. Ahh. I'll echo Malcolm's +0 on that then. I haven't found a need for it, but it seems like I'd find a use for it if it were there. Joseph --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---