AttributeError: 'ForeignKey' object has no attribute 'rel'

AttributeError: 'ForeignKey' object has no attribute 'rel'

可能是Django框架更新的原因

#data_list =filter_field_obj.rel.to.objects.all()这个不行换成以下代码
data_list = filter_field_obj.remote_field.model.objects.all()
原文地址:https://www.cnblogs.com/hongdoudou/p/12639713.html