Dump data correctly on Django

serg | Feb. 1, 2021, 3:59 a.m.

When running python manage.py loaddata you may get the error: "Duplicate key issue when loading DUMP.json file PostgreSQL" . Before loading the data the datadump must be made excluding some service django info. The dumpdata command syntax may look like this: python manage.py dumpdata --exclude auth.Permission --exclude contenttypes --exclude admin.logentry --exclude sessions.session --exclude authtoken.token --indent 2 > './dumpfile.json'