Is there are possibility to filter ForeignKeys field query in djano models?
(by default django uses objects.all() i guess).
See the example bellow :
Server -> Conf -> sip_conf -> peer -> context
Server -> ext_conf -> context
The contextFK can be only in list of the context’s_ID which contain in the ext_conf model for the same ServerFK for Conf and ext_conf;
It’s it’s a relative straight-forward limitation, you can use
limit_choices_to.Anything too complicated, you’ll need to override the
ModelForm: