Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# Importing Sqlite to Postgres Heroku Django
python manage.py dumpdata --exclude=contenttypes --exclude=auth.permission > datadump.json
# Change settings.py to your mysql
# Make sure you can connect on your mysql (permissions,etc)
python manage.py migrate
#Exclude contentype data with this snippet in shell
python manage.py shell
from django.contrib.contenttypes.models import ContentType
ContentType.objects.all().delete()
quit()
python manage.py loaddata datadump.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment