Hi Bruno,

On 03/07/2013 12:42 PM, Bruno ReniƩ wrote:
> * Move formfield_for_* to ModelForm and document them as public APIs
> * Deprecate `formfield_callback`
> * Write an AdminModelForm class that implements all the admin form
> fields and widgets customization
> * Modify ModelAdmin to make use of that base class
> * (maybe?) deprecate ModelForm.Meta.widgets in favor of something
> similar to the admin's formfield_overrides, which is more generic.

I have run into #12915 before, and I'm enthusiastically in favor of the
first four items here. I agree that although formfield_callback is
technically not public API, it would be safer and not unreasonably
difficult to give it a deprecation path.

Regarding the fifth point, I think it would be great to have a simpler
way to override not only widgets, but also labels, help_texts, and error
messages on ModelForms (as discussed recently on
https://code.djangoproject.com/ticket/20000 and in IRC). I don't
necessarily have a problem with unifying all of those into a single Meta
option, but I don't think it's really that much better than making them
separate options -- not enough so to justify a deprecation process for
Meta.widgets, IMO. Also, I think it's better for them to be indexed by
field name rather than type (formfield_overrides is indexed by type).

Carl

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to