Reputation: 902
In the project i used 2 packages "django-import-export" and "django-mptt" url follow below.
django-import-export : https://django-import-export.readthedocs.io/en/latest/
django-mqtt : https://django-mptt.readthedocs.io/en/latest/overview.html
I have a problem when i import using django-import-export is not work with mqtt models. show error below
PARENT
Cannot assign "'Dept1'": "Dept.parent" must be a "Dept" instance.
i think the error is cause when I import data from xlsx. the django-import-export will try to check data. due to MPTT have a node parent the second record will try to add data but not have a parent in the database.
i want to know how i can to import and export ?
thank you for expert .
Upvotes: 0
Views: 106