#9994: list_filter ignores to_field
-------------------------------------------+--------------------------------
          Reporter:  jzylks                |         Owner:  nobody
            Status:  new                   |     Milestone:        
         Component:  django.contrib.admin  |       Version:  1.0   
        Resolution:                        |      Keywords:        
             Stage:  Unreviewed            |     Has_patch:  0     
        Needs_docs:  0                     |   Needs_tests:  0     
Needs_better_patch:  0                     |  
-------------------------------------------+--------------------------------
Changes (by jzylks):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 I've found a possible fix for this:

 filterspecs.py, Line 61

 Changing

 {{{self.lookup_kwarg = '%s__%s__exact' % (f.name,
 f.rel.to._meta.pk.name)}}}

 to

 {{{self.lookup_kwarg = '%s__%s__exact' % (f.name,
 f.rel.get_related_field().attname)}}}

 fixes the problem for me.

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