Skip to content

Instantly share code, notes, and snippets.

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