[Django] #21999: have filter_horizontal / filter_vertical work with ForeignKey

5 views
Skip to first unread message

Django

unread,
Feb 10, 2014, 9:00:50 AM2/10/14
to django-...@googlegroups.com
#21999: have filter_horizontal / filter_vertical work with ForeignKey
-------------------------------+------------------------------------------
Reporter: rm_ | Owner: nobody
Type: New feature | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Keywords: admin FilteredSelectMultiple
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------------
When you have many values for a ForeignKey the ability to filter it comes
very handy.

From a quick look at the code this is what is required:
- update contrib/admin/checks.py, contrib/admin/validation.py,
contrib/admin/options.py to permit filter_* on ForeignKeys
- make FilteredSelectMultiple accept a max_entries limit so that a
ForeignKey is limited to 1 filtered entry but a ManyToMany may have any
limit > 1
- have the javascript work accordingly with the aforementioned limit

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

Django

unread,
Feb 18, 2014, 9:06:04 AM2/18/14
to django-...@googlegroups.com
#21999: have filter_horizontal / filter_vertical work with ForeignKey
-------------------------------------+-------------------------------------
Reporter: rm_ | Owner: nobody
Type: New feature | Status: closed
Component: contrib.admin | Version: master
Severity: Normal | Resolution: wontfix
Keywords: admin | Triage Stage:
FilteredSelectMultiple | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timo):

* status: new => closed
* needs_docs: => 0
* resolution: => wontfix
* needs_tests: => 0
* needs_better_patch: => 0


Comment:

Thanks for the suggestion, but I think it's better to use `raw_id_fields`
which is already designed for `ForeignKey`.

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

Reply all
Reply to author
Forward
0 new messages