Currently the BaseModelAdmin class has a method called formfield_for_dbfield which has a conditional block that in turn calls different formfield_for_* methods depending on the type of database field it is handling. In order to do any custom logic to these fields we need to override these methods and/or pass in some arguments as kwargs to override attributes of the form field.
In my opinion, a more natural way is to let different objects handle the customization, rather than BaseModelAdmin. I'm proposing AdminField classes with a consistent API that others can subclass from and swap with the defaults if they desire. I've done so preliminary work that you can see in this PR: https://github.com/django/django/pull/6026 -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/e3bd9f19-4a7a-4a98-bfa4-a530ff53f714%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.