#18501: Custom fields as foreign keys fix
-------------------------------------+-------------------------------------
     Reporter:  msopacua             |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:
     Keywords:  RelatedField         |  Unreviewed
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by msopacua):

 Ok, so I'm unable to write a proper test case, because the ModelForm class
 does not expose the bug but the admin change form does. So the admin does
 something special, that I'm unable to figure out that exposes this bug.

 Therefore I've provided an app "devices", that is a copy of the models
 involved reduced to the size that they still expose the bug. The test case
 therein as said, works properly. However, if one adds 'devices' to the
 installed apps of a project, load the fixture and then browse to
 http://localhost/admin/devices/devicepciid/1/ you will see that the vendor
 is not selected. Applying the patch, reloading application and refreshing
 the browser will show that the vendor is selected. I suspect the formfield
 callback to be the culprit but can't really figure out how to make this
 into a proper test case.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18501#comment:2>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to