#15203: admin search_fields splitting query
------------------------------------------------+---------------------------
               Reporter:  wkornewald            |         Owner:  nobody
                 Status:  closed                |     Milestone:  1.3   
              Component:  django.contrib.admin  |       Version:  1.2   
             Resolution:  invalid               |      Keywords:        
           Triage Stage:  Unreviewed            |     Has patch:  1     
    Needs documentation:  1                     |   Needs tests:  1     
Patch needs improvement:  0                     |  
------------------------------------------------+---------------------------
Changes (by kmtracey):

  * status:  new => closed
  * needs_docs:  0 => 1
  * resolution:  => invalid
  * needs_tests:  0 => 1


Comment:

 (When formatting only one inline backtick is needed; doubling them
 effectively removes them.)

 I think you have overlooked the case of multiple fields listed in
 search_fields. I have used fields prefixed with equal in search_fields and
 I currently do get the results I expect, based on the
 
[http://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.search_fields
 existing doc], when entering multiple words in the search field. (One word
 entered can match exactly the equal-preceded field in search_fields and
 another can match some other field in search fields.) The doc already
 notes that it's not possible to search for an exact match on a value that
 contains a space. As far as I can see current behavior is easily
 understandable and documented, even if it is  restrictive on what exactly
 you can search for. I think the change you propose would break the case
 where there are multiple fields in search_fields.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/15203#comment:3>
Django <http://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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to