Re: [Django] #12915: formfield_callback is lost in an inherited ModelForm

12 views
Skip to first unread message

Django

unread,
May 7, 2011, 11:07:22 AM5/7/11
to django-...@googlegroups.com
#12915: formfield_callback is lost in an inherited ModelForm
------------------------------------+------------------------
Reporter: semenov | Owner: nobody
Type: Bug | Status: new
Milestone: | Component: Forms
Version: 1.1 | Severity: Normal
Resolution: | Keywords:
Triage Stage: Accepted | Has patch: 1
Needs documentation: 0 | Needs tests: 1
Patch needs improvement: 1 | Easy pickings: 0
------------------------------------+------------------------
Changes (by tomchristie):

* 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.

Django

unread,
Jun 13, 2012, 6:14:17 AM6/13/12
to django-...@googlegroups.com
#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
-------------------------+------------------------------------
Changes (by jezdez):

* needs_docs: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/12915#comment:10>

Django

unread,
Mar 22, 2014, 7:37:10 PM3/22/14
to django-...@googlegroups.com
#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 melinath):

Also, just FTR - formfield_callback use *is* documented with
modelform_factory.

--
Ticket URL: <https://code.djangoproject.com/ticket/12915#comment:11>

Django

unread,
Aug 21, 2014, 12:56:27 PM8/21/14
to django-...@googlegroups.com
#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):

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>

Django

unread,
Aug 22, 2014, 3:26:55 AM8/22/14
to django-...@googlegroups.com
#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 claudep):

Writing a test would probably be the next step.

--
Ticket URL: <https://code.djangoproject.com/ticket/12915#comment:13>

Django

unread,
Aug 22, 2014, 11:06:42 AM8/22/14
to django-...@googlegroups.com
#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

unread,
Aug 22, 2014, 11:09:28 AM8/22/14
to django-...@googlegroups.com
#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: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------+------------------------------------
Changes (by IlyaSemenov):

* needs_tests: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/12915#comment:15>

Django

unread,
Aug 23, 2014, 4:02:04 AM8/23/14
to django-...@googlegroups.com
#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: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------+------------------------------------

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>

Django

unread,
Apr 4, 2016, 8:45:05 AM4/4/16
to django-...@googlegroups.com
#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: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------+------------------------------------
Changes (by vzima):

* cc: vlastimil.zima@… (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/12915#comment:17>

Django

unread,
May 7, 2016, 11:12:45 AM5/7/16
to django-...@googlegroups.com
#12915: formfield_callback is lost in an inherited ModelForm
-------------------------+-------------------------------------
Reporter: semenov | Owner: nobody
Type: Bug | Status: closed
Component: Forms | Version: 1.1
Severity: Normal | Resolution: duplicate

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------+-------------------------------------
Changes (by timgraham):

* 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>

Reply all
Reply to author
Forward
0 new messages