On Wed, May 21, 2008 at 8:44 AM, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > However, that said: I might be missing something here, but we've just > gone through the process of deprecating form_for_model and > form_for_instance based upon the reasoning that a class based form > definition is more flexible than trying to shoehorn everything into a > factory method. Is there a reason that we are introducing a new set of > factory methods rather than using a definition analogous to ModelForm? > To that end, isn't modelform_factory an analog of form_for_model?
Brian and I both tried to come up with a class based syntax to take care of formsets, but everything we came up with felt forced... like we were *just* doing it as an attempt at consistency. Our attempts actually made the implementation worse. This is one of the reasons Brian wrote the email though. If someone wants to propose a class based syntax, please do so. I'd love to see something better, and I have a hunch that there *is* a better way. I've been sitting on it for a few months now, and nothing has come to me. I'm probably too close to the problem though. For the record, it was just form_for_instance that I really wanted to see destroyed... form_for_model is actually pretty useful in some cases. You'll notice that there's no _for_instance analogues in the API ;) > Regarding the docs - I'm sure Adrian will apply his magic pencil, but > as a first draft, it looks pretty good to me. One suggestion - the > 'can_order' option needs a little more elaboration on how the order > field can actually be used - i.e., how do I use the order field to > effect organization in my children? Indeed. That might be a "not ready for primetime" feature right now. It doesn't work with models yet, and it might be better to provide a field class, or a widget for ordering and deletion. 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 -~----------~----~----~----~------~----~------~--~---