I have explored a lot of examples django export/import. When I try importing in a table with foreign key with datatype string, I get this error - " invalid literal for int() with base 10", which I understand because the foreign key field has datatype 'int'.
But for that before importing, do I have to edit the column in my csv with 'int' id values of the column being looked up for translating the foreign key value.Please share any working examples, I want to use a column of datatype string as foreign key and not the integer.
Without an example it would be difficult to tell the exact issue. But from what you have posted. I guess the problem you are facing is you have the
id value as floating number.
int('55063.000000') Traceback (most recent call last): File "<input>", line 1, in <module> ValueError: invalid literal for int() with base 10: '55063.000000'
To solve it you can do something like this