1👍
✅
You can use limit_choices_to
argument to ManyToManyField
.
It works exactly similar to limit_choices_to
argument in ForeignKey
. You can check out examples given in in ForeignKey
documentation.
Source:stackexchange.com