Closed rmsandu closed 5 years ago
Solved with:
in your local database you create some ContentType instances.
when you migrate your remote database all ContentType for your models created again.
but when you want to load data you try to load this instances again.
you have 2 solutions
1- remove all content types instances from remote host using django shell
python manage.py shell
>>> from django.contrib.contentypes.models import ContentType >>> ContentType.objects.all().delete()
2- remove content type instances from dumped data python manage.py dumpdata --exclude contenttypes
python manage.py dumpdata --exclude contenttypes
Solved with:
in your local database you create some ContentType instances.
when you migrate your remote database all ContentType for your models created again.
but when you want to load data you try to load this instances again.
you have 2 solutions
1- remove all content types instances from remote host using django shell
python manage.py shell
2- remove content type instances from dumped data
python manage.py dumpdata --exclude contenttypes