July 2011
1 post
django manage.py loaddata without constraints
I had to quickly inject a dumpdata json file on a mysql server and got this nice message: IntegrityError: (1452, 'Cannot add or update a child row: a foreign key constraint fails I created a settings file for the loaddata command without mysql foreignkey checks. DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'OPTIONS': { "init_command":...
Jul 20th
1 note