* cc: tom@… (added)
* easy: => 0
--
Ticket URL: <http://code.djangoproject.com/ticket/12915#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_docs: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/12915#comment:10>
Comment (by melinath):
Also, just FTR - formfield_callback use *is* documented with
modelform_factory.
--
Ticket URL: <https://code.djangoproject.com/ticket/12915#comment:11>
Comment (by IlyaSemenov):
How'd you like to improve the latest patch? It's been 5 years, and I'm
suffering from this again.
--
Ticket URL: <https://code.djangoproject.com/ticket/12915#comment:12>
Comment (by claudep):
Writing a test would probably be the next step.
--
Ticket URL: <https://code.djangoproject.com/ticket/12915#comment:13>
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>
* needs_tests: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/12915#comment:15>
Comment (by claudep):
Replying to [comment:14 IlyaSemenov]:
> 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)?
Indeed, I think it would be an interesting alternative to consider.
--
Ticket URL: <https://code.djangoproject.com/ticket/12915#comment:16>
* cc: vlastimil.zima@… (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/12915#comment:17>
* status: new => closed
* resolution: => duplicate
Comment:
Duplicate of #24974 which is fixed in Django 1.10.
--
Ticket URL: <https://code.djangoproject.com/ticket/12915#comment:18>