#30790: `autocomplete_fields` checks restrict usage to `search_fields` being
defined instead of `get_search_fields`
-------------------------------+--------------------------------------
     Reporter:  Chad G Hansen  |                    Owner:  nobody
         Type:  Bug            |                   Status:  closed
    Component:  contrib.admin  |                  Version:  2.2
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------
Changes (by Simon Charette):

 * status:  new => closed


Comment:

 It feels like this is a case where you'd want to
 [https://docs.djangoproject.com/en/2.2/ref/settings/#std:setting-
 SILENCED_SYSTEM_CHECKS silence the check] instead as the system check
 framework is only meant to perform static analysis, that's the approach
 we've taken with other admin getter methods in the past.

 These methods are also usually overridden to add per-request logic which
 cannot be captured by passing `None` and would also backward incompatible.

 If your admin class doesn't define request specific logic I suggest you
 define a `search_fields` using a `@property` which will be considered for
 the check.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30790#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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.82a3379f12a47064fc094075d1d3aae3%40djangoproject.com.

Reply via email to