#32629: Autocomplete module broken
-----------------------------------------+------------------------------
               Reporter:  JohnieBraaf    |          Owner:  nobody
                   Type:  Uncategorized  |         Status:  new
              Component:  Uncategorized  |        Version:  3.2
               Severity:  Normal         |       Keywords:  Autocomplete
           Triage Stage:  Unreviewed     |      Has patch:  0
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  1
                  UI/UX:  0              |
-----------------------------------------+------------------------------
 Autocomplete fields in Admin Change From seem broken since version 3.2.

 There seams to be a missing get_limit_choices_to() method.

 Traceback (most recent call last):
   File "D:\Python39\lib\site-packages\django\core\handlers\exception.py",
 line 47, in inner
     response = get_response(request)
   File "D:\Python39\lib\site-packages\django\core\handlers\base.py", line
 181, in _get_response
     response = wrapped_callback(request, *callback_args,
 **callback_kwargs)
   File "D:\Python39\lib\site-packages\django\contrib\admin\sites.py", line
 250, in wrapper
     return self.admin_view(view, cacheable)(*args, **kwargs)
   File "D:\Python39\lib\site-packages\django\utils\decorators.py", line
 130, in _wrapped_view
     response = view_func(request, *args, **kwargs)
   File "D:\Python39\lib\site-packages\django\views\decorators\cache.py",
 line 44, in _wrapped_view_func
     response = view_func(request, *args, **kwargs)
   File "D:\Python39\lib\site-packages\django\contrib\admin\sites.py", line
 232, in inner
     return view(request, *args, **kwargs)
   File "D:\Python39\lib\site-packages\django\contrib\admin\sites.py", line
 417, in autocomplete_view
     return AutocompleteJsonView.as_view(admin_site=self)(request)
   File "D:\Python39\lib\site-packages\django\views\generic\base.py", line
 70, in view
     return self.dispatch(request, *args, **kwargs)
   File "D:\Python39\lib\site-packages\django\views\generic\base.py", line
 98, in dispatch
     return handler(request, *args, **kwargs)
   File "D:\Python39\lib\site-
 packages\django\contrib\admin\views\autocomplete.py", line 25, in get
     self.object_list = self.get_queryset()
   File "D:\Python39\lib\site-
 packages\django\contrib\admin\views\autocomplete.py", line 42, in
 get_queryset
     qs = qs.complex_filter(self.source_field.get_limit_choices_to())
 AttributeError: 'ManyToOneRel' object has no attribute
 'get_limit_choices_to'

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32629>
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/054.8e961c6ab072f11abcf2a289d32dee5e%40djangoproject.com.

Reply via email to