#13902: When using a ManyToMany in list_filter, results may apper more than once
-------------------------------------------+--------------------------------
          Reporter:  rasca                 |         Owner:  rasca              
                     
            Status:  new                   |     Milestone:  1.3                
                     
         Component:  django.contrib.admin  |       Version:  SVN                
                     
        Resolution:                        |      Keywords:  admin change_list 
list_filter manytomany
             Stage:  Accepted              |     Has_patch:  1                  
                     
        Needs_docs:  0                     |   Needs_tests:  0                  
                     
Needs_better_patch:  1                     |  
-------------------------------------------+--------------------------------
Changes (by ramiro):

  * needs_better_patch:  0 => 1

Comment:

 The modification to the search checks in the patch is making `admin_views`
 tests to fail, these tests are related to `search_fields` option values
 that specify a reverse FK accesor:
 {{{
 ======================================================================
 ERROR: test_search_on_sibling_models
 (regressiontests.admin_views.tests.AdminSearchTest)
 Check that a search that mentions sibling models
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "django/upstream/tests/regressiontests/admin_views/tests.py", line
 1491, in test_search_on_sibling_models
     response =
 self.client.get('/test_admin/admin/admin_views/recommendation/?q=bar')
   File "django/upstream/django/test/client.py", line 441, in get
     response = super(Client, self).get(path, data=data, **extra)
   File "django/upstream/django/test/client.py", line 225, in get
     return self.request(**r)
   File "django/upstream/django/core/handlers/base.py", line 111, in
 get_response
     response = callback(request, *callback_args, **callback_kwargs)
   File "django/upstream/django/contrib/admin/options.py", line 298, in
 wrapper
     return self.admin_site.admin_view(view)(*args, **kwargs)
   File "django/upstream/django/utils/decorators.py", line 93, in
 _wrapped_view
     response = view_func(request, *args, **kwargs)
   File "django/upstream/django/views/decorators/cache.py", line 79, in
 _wrapped_view_func
     response = view_func(request, *args, **kwargs)
   File "django/upstream/django/contrib/admin/sites.py", line 190, in inner
     return view(request, *args, **kwargs)
   File "django/upstream/django/utils/decorators.py", line 28, in _wrapper
     return bound_func(*args, **kwargs)
   File "django/upstream/django/utils/decorators.py", line 93, in
 _wrapped_view
     response = view_func(request, *args, **kwargs)
   File "django/upstream/django/utils/decorators.py", line 24, in
 bound_func
     return func(self, *args2, **kwargs2)
   File "django/upstream/django/contrib/admin/options.py", line 1034, in
 changelist_view
     self.list_select_related, self.list_per_page, self.list_editable,
 self)
   File "django/upstream/django/contrib/admin/views/main.py", line 66, in
 __init__
     self.query_set = self.get_query_set()
   File "django/upstream/django/contrib/admin/views/main.py", line 261, in
 get_query_set
     f = self.lookup_opts.get_field(field_name.split('__',1)[0])
   File "django/upstream/django/db/models/options.py", line 279, in
 get_field
     raise FieldDoesNotExist('%s has no field named %r' %
 (self.object_name, name))
 FieldDoesNotExist: Recommendation has no field named 'titletranslation'
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13902#comment:6>
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to