X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/a6423a6739a7cc4f8bb0c7e482d56a88ef201f2a..4e1191300b4ebea295dee07769dc9da4e7149395:/forms/entities.py?ds=sidebyside diff --git a/forms/entities.py b/forms/entities.py index b6259a3..327a0eb 100644 --- a/forms/entities.py +++ b/forms/entities.py @@ -43,7 +43,9 @@ class EntityFormBase(ModelForm): _old_metaclass_new = ModelFormMetaclass.__new__ def _new_metaclass_new(cls, name, bases, attrs): - formfield_callback = attrs.get('formfield_callback', lambda f, **kwargs: f.formfield(**kwargs)) + formfield_callback = attrs.get('formfield_callback', None) + if formfield_callback is None: + formfield_callback = lambda f, **kwargs: f.formfield(**kwargs) new_class = _old_metaclass_new(cls, name, bases, attrs) opts = new_class._meta if issubclass(new_class, EntityFormBase) and opts.model: