Opened 3 weeks ago
Closed 3 weeks ago
#37008 closed Cleanup/optimization (wontfix)
AutocompleteJsonView should return source_model and remote_model in process_request
| Reported by: | Mateusz Kurowski | Owned by: | |
|---|---|---|---|
| Component: | contrib.admin | Version: | 6.0 |
| Severity: | Normal | Keywords: | admin, autocomplete, AutocompleteJsonView |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Hey, I think it makes sense if you want to perform extra work in subclassed AutocompleteJsonView.
By binding these values to instance properties they are accesible in get_queryset
The lookup is already happening there's no reason to do it twice.
Change History (2)
comment:1 by , 3 weeks ago
| Summary: | AutocompleteJsonView shouuld return source_model and remote_model in process_request → AutocompleteJsonView should return source_model and remote_model in process_request |
|---|
comment:2 by , 3 weeks ago
| Resolution: | → wontfix |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Hello Mateusz Kurowski, thank you for the report.
AutocompleteJsonViewis not a documented class and is not part of Django’s public API. Changes aimed at improving its extensibility or reuse would require broader community consensus first. Please start a discussion on the Django Forum to gather use cases and feedback. Based on that, this can be revisited with a clearer proposal. For now, closing aswontfix.