#23754: DisallowedModelAdminToField when using get_inline_instances()
---------------------------------+------------------------------------
     Reporter:  timgraham        |                    Owner:  nobody
         Type:  Bug              |                   Status:  new
    Component:  contrib.admin    |                  Version:  1.4
     Severity:  Release blocker  |               Resolution:
     Keywords:                   |             Triage Stage:  Accepted
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+------------------------------------

Comment (by charettes):

 The `to_field` check is failing here because it only collects statically
 defined inline classes for its sanity checks. This could be solved by one
 of the following:

 1. Document that `get_inline_instances()` should always return instances
 of a subset of the classes defined in `inlines`.
 2. Publicly document `to_field_allowed()` and link to it
 `get_inline_instances()`'s documentation noting that it might require
 overriding if `1.` criteria is not met.
 3. Completely abandon the whole static analysis against site admin
 registries and only rely on model relationships to allow of deny reference
 to fields.

 Given the many regression caused by the inner admin site references
 enforcement I think `3.` might be our best option. Thoughts?

--
Ticket URL: <https://code.djangoproject.com/ticket/23754#comment:1>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.abc0fa5f916a1a61f8427ba05e58390a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to