#12915: formfield_callback is lost in an inherited ModelForm
-------------------------+------------------------------------
     Reporter:  semenov  |                    Owner:  nobody
         Type:  Bug      |                   Status:  new
    Component:  Forms    |                  Version:  1.1
     Severity:  Normal   |               Resolution:
     Keywords:           |             Triage Stage:  Accepted
    Has patch:  1        |      Needs documentation:  1
  Needs tests:  1        |  Patch needs improvement:  1
Easy pickings:  0        |                    UI/UX:  0
-------------------------+------------------------------------

Comment (by IlyaSemenov):

 Added tests: https://github.com/IlyaSemenov/django/tree/ticket_12915

 I am not happy with the patch either, but the main problem here is the
 original design decision to provide formfield_callback as a class-level
 lambda rather than @staticmethod or a Meta class attribute.

 Will it make it better if I come up with a patch which moves
 `formfield_callback` into the Meta class (where it would make perfect
 sense along with `widgets` and `labels`), or even allows to use ''either''
 way (for backward compatibility)?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/12915#comment:14>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.7a7dd01e2c6fe4aed2df81bdc401796a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to