A couple of months ago Jannis closed #/17924 [1] as wontfix, stating "I'm
violently -1 on the whole topic "meta programming form fields after they've
been instantiated", it's a mess. Yes it would be more DRY, but also much
harder to know how the hell the form fields are composed as. Just override
the form field, it's not a huge deal code wise and much easier to grok." This
has since been contested [2] (though for invalid reasons in my opinion).

I'm not sure that Jannis and I were talking about the same thing; the
solution I had in mind did not involve changing form-fields after their
instantiation, but rather providing a more elegant and flexible mechanism
that works in a similar way to ModelForm.Meta.widgets and
formfield_callback.

I've put a draft patch together and attached it to [1] which should give a
better indication of the intended approach and its flexibility and
benefits. There are still a few details to iron out in evolving the ideal
implementation, but this at least demonstrates the gist of it. Does anyone
else think this is worth exploring?

Simon

[1] https://code.djangoproject.com/ticket/17924
[2] *
https://groups.google.com/d/msg/django-developers/x_nJ5epfG18/ZSKcPW0_DvAJ*

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected].
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.

Reply via email to