Opened 4 years ago
Closed 4 years ago
#32629 closed Bug (duplicate)
Autocomplete module broken
Reported by: | Jan Staal | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | 3.2 |
Severity: | Normal | Keywords: | Autocomplete |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | yes |
Description
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'
Change History (4)
comment:1 by , 4 years ago
Component: | Uncategorized → contrib.admin |
---|
comment:2 by , 4 years ago
Type: | Uncategorized → Bug |
---|
comment:3 by , 4 years ago
UI/UX: | set |
---|
comment:4 by , 4 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Duplicate of #32619.