def get_lookup(self, main_field, for_remote, alias):
"""
create a fake field for the lookup capability
:param CompositeForeignKey main_field: the local fk
:param Field for_remote: the remote field to match
:return:
"""
lookup_class = for_remote.get_lookup("exact")
return lookup_class(for_remote.get_col(alias), self.value)
评论列表
文章目录