[Django] #32146: Make AutocompleteSelect and AutocompleteSelectMultiple easier to reuse

90 views
Skip to first unread message

Django

unread,
Oct 26, 2020, 5:10:36 AM10/26/20
to django-...@googlegroups.com
#32146: Make AutocompleteSelect and AutocompleteSelectMultiple easier to reuse
-------------------------------------+-------------------------------------
Reporter: Andy | Owner: nobody
Babic |
Type: | Status: new
Cleanup/optimization |
Component: | Version: 3.1
contrib.admin |
Severity: Normal | Keywords: autocomplete
Triage Stage: | Has patch: 1
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
The 'rel' argument currently required for Autocomplete widget
instantiation is a little confusing if you don't know a huge amount about
relationship field internals, and is also unnecessary, it would seem. It
looks as though the only reason for passing this, is that the model class
can be extracted from it. However, if used with `ModelChoiceField` and
`ModelMultipleChoiceField` (which is, currently, always the case), that is
available from the `self.choices` (a `ModelChoiceIterator`).

https://github.com/django/django/pull/13060/files

--
Ticket URL: <https://code.djangoproject.com/ticket/32146>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 26, 2020, 6:17:13 AM10/26/20
to django-...@googlegroups.com
#32146: Make AutocompleteSelect and AutocompleteSelectMultiple easier to reuse
-------------------------------------+-------------------------------------
Reporter: Andy Babic | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: contrib.admin | Version: 3.1
Severity: Normal | Resolution: wontfix
Keywords: autocomplete | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* resolution: => wontfix


Comment:

Thanks for this proposition. However, we have several tickets about bugs
in `AutocompleteSelect` (see #29010 and #29138) and proposed
[https://github.com/django/django/pull/11026 solution] is changing
`db_field.rel` to `db_field` that is used more widely. I don't think we
can remove it.

--
Ticket URL: <https://code.djangoproject.com/ticket/32146#comment:1>

Reply all
Reply to author
Forward
0 new messages