Skip to content

Instantly share code, notes, and snippets.

@axoplasm
Last active February 6, 2019 00:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save axoplasm/fc9890a38c5300ef3822b4c9337c7499 to your computer and use it in GitHub Desktop.
Save axoplasm/fc9890a38c5300ef3822b4c9337c7499 to your computer and use it in GitHub Desktop.
Django Wagtail one-liner for database-agnostic JSON dumps

This is much harder than it needs to be.

See here and here. This issue won’t help.

(venv) $ ./manage.py dumpdata --indent=4 --natural-primary --natural-foreign -e contenttypes -e auth.Permission -e wagtailcore.groupcollectionpermission > dumpfile.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment