#12024: error with limit_choices_to with complex queries (Q object) and
raw_id_fields
-------------------------------------------+--------------------------------
          Reporter:  anonymous             |         Owner:  nobody
            Status:  reopened              |     Milestone:  1.2   
         Component:  django.contrib.admin  |       Version:  1.1   
        Resolution:                        |      Keywords:        
             Stage:  Accepted              |     Has_patch:  0     
        Needs_docs:  0                     |   Needs_tests:  0     
Needs_better_patch:  0                     |  
-------------------------------------------+--------------------------------
Comment (by ubernostrum):

 Replying to [comment:4 kmtracey]:
 > Not sure a Q object can be encoded into a URL query string for an admin
 filter lookup...but I'm also exhausted at the moment so I could be missing
 something obvious.

 Indeed. A `Q` object which only uses "and" connectors could be dumped into
 a querystring fairly easily, but one which uses "or" can't because there's
 no way to represent that short of the `Q` object itself.

 My vote would be for documenting that `Q` in `limit_choices_to` isn't
 compatible with raw-id lookups, and leaving it at that.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/12024#comment:7>
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-upda...@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