#36881: Documented list of support fields for ModelAdmin.search_fields is
inaccurate
----------------------------+-----------------------------------------
Reporter: Tim Graham | Type: Bug
Status: new | Component: Documentation
Version: dev | Severity: Normal
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+-----------------------------------------
Since Django 1.0, the documentation for `ModelAdmin.search_fields` has
said, "These fields should be some kind of text field, such as CharField
or TextField.", however, this isn't the extent of what's supported. For
example, in the test in 76ccce64cc3d66cfec075651c3d2239fda747dc2 uses
`search_fields = ['child__name', 'child__age']` (the latter is an
`IntegerField`) and 6bc4ff36db0d85ac96ca91ae758159ee43836f86 tests
`search_fields = ['group__pk']`. That said, there may be performance
issues with non-integer fields, see ticket:26001#comment:24, so it may be
prudent to try to address that first, or at least document the caveats of
using non-string fields.
--
Ticket URL: <https://code.djangoproject.com/ticket/36881>
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 visit
https://groups.google.com/d/msgid/django-updates/0107019bed7ce5f1-c497aad7-e94f-4e73-b6bc-188d4d72c3f8-000000%40eu-central-1.amazonses.com.