valdergallo / data-importer

Django Data Importer
https://django-data-importer.readthedocs.org/
Other
68 stars 32 forks source link

One file two models #96

Closed victtorvpb closed 6 years ago

victtorvpb commented 6 years ago

How import one Xls into two models, using foreign key?

valdergallo commented 6 years ago

Hi @victorpb

The FK will be parsed as int value #68

valdergallo commented 6 years ago

You can use the to_field method in django FK to use one string field.

Or override method clean_row to get your FK model before to save

victtorvpb commented 6 years ago

@valdergallo Thanks!