Closed
Description
The django ForeignKey
fields support the keyword argument limit_choices_to
, which when present, limits the available choices available by default when a ModelForm
is created.
The serializer fields that represent relationships do not respect this keyword argument. I propose they should.
If accepted, it appears the place to do this would be in rest_framework.relations.RelatedField
in the initialize
method. Open to alternative suggestions on where/how to implement this.