DEV Community

Discussion on: How to Export & Import Data | Django Package Series #3

Collapse
 
mwangidenis11 profile image
Mwangi Denis • Edited

I keep trying to import data but get the error

"Field 'id' expected a number but got 'Plastic Consumables'."
Plastic Consumables is my 1st data column after the id header

I'm importing via admin.

Collapse
 
julkhafi profile image
julkhafi

Looks like Plastic Consumables is a foreign key field. If so, you need to use foreign key widget (see more info in docs). Don`t forget to specify a resource_class under admin model inherited from ImportExportModelAdmin!