I\'m trying to import data to one of my models, but it\'s failing because I\'m trying to upload the foreignKey Id, not the iterated number that import-export creates.
class SolResource(resources.ModelResource):
school_id = fields.Field()
class Meta:
# ...
def dehydrate_school_id(self, sol):
return sol.school_id.school_id # You can get all fields of related model. This is example.