Here's the scenario:
I'm using django's admin interface and I would like to be able to load users and groups via fixtures (if this is possible.) I'm able to dump users/groups like so:
manage.py dumpdata auth auth.group > usersandgroups.json
But upon loading the data in a brand new database...
manage.py loaddata <appname>/fixtures/usersandgroups.json
I get all sorts of errors having to do with foreign keys and such. Here's an example of one:
django.db.utils.IntegrityError: insert or update on table "auth_permission" violates foreign key constraint "content_type_id_refs_id_728de91f"
DETAIL: Key (content_type_id)=(37) is not present in table "django_content_type".
I'd really appreciate it if anyone could point me in the right direction. Thanks in advance!
django.db.utils.IntegrityError: insert or update on table "auth_user_user_permissions" violates foreign key constraint "auth_user_user_permissions_permission_id_fkey" DETAIL: Key (permission_id)=(111) is not present in table "auth_permission".
– Bod