I just came across ForeignKey.limit_choices_to in the Django docs. Not sure yet how this works, but it might just be the right thing here. Update: ForeignKey.li.
DOWNLOAD: https://byltly.com/2eso9x
DOWNLOAD: https://byltly.com/2eso9x
django-admin-limit-foreign-key-choices
Jun 1, 2011 — or how to limit dynamic foreign key choices in both edit drop-down and admin filter. The problem: Having a foreign key between models in ... 3925e8d270
コメント