Created
June 28, 2010 13:50
-
-
Save davidbgk/455860 to your computer and use it in GitHub Desktop.
To load Django fixtures without any IntegrityError
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db.models import signals | |
from django.contrib.auth import models as auth_app | |
from django.contrib.auth.management import create_permissions, create_superuser | |
from django.contrib.contenttypes.management import update_contenttypes | |
signals.post_syncdb.disconnect(update_contenttypes) | |
signals.post_syncdb.disconnect(create_permissions, | |
dispatch_uid = "django.contrib.auth.management.create_permissions") | |
signals.post_syncdb.disconnect(create_superuser , | |
sender=auth_app, dispatch_uid = "django.contrib.auth.management.create_superuser") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment