Opened 3 years ago

Closed 3 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


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\", line 47, in inner

response = get_response(request)

File "D:\Python39\lib\site-packages\django\core\handlers\", line 181, in _get_response

response = wrapped_callback(request, *callback_args, callback_kwargs)

File "D:\Python39\lib\site-packages\django\contrib\admin\", line 250, in wrapper

return self.admin_view(view, cacheable)(*args, kwargs)

File "D:\Python39\lib\site-packages\django\utils\", line 130, in _wrapped_view

response = view_func(request, *args, kwargs)

File "D:\Python39\lib\site-packages\django\views\decorators\", line 44, in _wrapped_view_func

response = view_func(request, *args, kwargs)

File "D:\Python39\lib\site-packages\django\contrib\admin\", line 232, in inner

return view(request, *args, kwargs)

File "D:\Python39\lib\site-packages\django\contrib\admin\", line 417, in autocomplete_view

return AutocompleteJsonView.as_view(admin_site=self)(request)

File "D:\Python39\lib\site-packages\django\views\generic\", line 70, in view

return self.dispatch(request, *args, kwargs)

File "D:\Python39\lib\site-packages\django\views\generic\", line 98, in dispatch

return handler(request, *args, kwargs)

File "D:\Python39\lib\site-packages\django\contrib\admin\views\", line 25, in get

self.object_list = self.get_queryset()

File "D:\Python39\lib\site-packages\django\contrib\admin\views\", 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 Jan Staal, 3 years ago

Component: Uncategorizedcontrib.admin

comment:2 by Jan Staal, 3 years ago

Type: UncategorizedBug

comment:3 by Jan Staal, 3 years ago

UI/UX: set

comment:4 by Mariusz Felisiak, 3 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #32619.

Note: See TracTickets for help on using tickets.
Back to Top