call the field.rel.to._meta.get_field method with an field.rel.field_name argument, on the result call the method to_python,
obj_pk = field . rel . to . _meta . get_field ( field . rel . field_name ) . to_python ( field_value )