Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to limit the foreignkey dropdown with constraints?

I have a database which keeps track of interaction between two different teams (represented in the admin interface by two different groups). For some fields, i have a foreignkey to Users database, and i would like to limit the dropdown people to only the specific groups.

If anyone have any suggestions, it would be much appreciated!

like image 599
FurtiveFelon Avatar asked Jun 17 '10 18:06

FurtiveFelon


1 Answers

You're looking for limit_choices_to.

like image 93
Ignacio Vazquez-Abrams Avatar answered Sep 28 '22 05:09

Ignacio Vazquez-Abrams