#32543: Add `search_help_text` to `admin.ModelAdmin`
-------------------------------------+------------------------------------
     Reporter:  Caram                |                    Owner:  nobody
         Type:  New feature          |                   Status:  new
    Component:  contrib.admin        |                  Version:  4.0
     Severity:  Normal               |               Resolution:
     Keywords:  admin search_fields  |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  1
  Needs tests:  1                    |  Patch needs improvement:  1
Easy pickings:  1                    |                    UI/UX:  1
-------------------------------------+------------------------------------

Comment (by Nick Pope):

 This is a good idea, I too have often wondered what I am able to search
 by.

 The current implementation in the PR is only allowing some free-form text
 to be set. I think it can be useful to allow this, but the default should
 be to create a `@property` on the base class that uses the contents of
 `search_fields`. This will require looking up the `verbose_name` on the
 model's field based on the value in `search_fields`.

 My concern about not doing this in an automated way by default is that
 `search_fields` will become out of sync with `search_help_text` which will
 be a worse situation than the status quo.

 The placeholder idea element is nice, but if there are more than about 3
 fields we'll not be able to see the entire placeholder. Again, perhaps
 more misleading than helpful.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32543#comment:4>
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/068.566c701a78a8b18ce8a621d1779c73c3%40djangoproject.com.

Reply via email to