Adds `--pretty` option to django `./manage.py dumpdata` command, which produces pretty utf-8 strings instead of ugly unicode-escaped s**t:
> $ ./manage.py dumpdata app.pricingplan --indent=1
<pre>
<code>[
{
"pk": 1,
"model": "app.pricingplan",
"fields": {
"name": "\u0411\u0430\u0437\u043e\u0432\u044b\u0439",
}
},
{
"pk": 2,
"model": "app.pricingplan",
"fields": {
"name": "\u0425\u0443\u044f\u0437\u043e\u0432\u044b\u0439",
}
}
]
</code>
</pre>
> ./manage.py dumpdata app.pricingplan --indent=1 --pretty
<pre>
<code>[
{
"pk": 1,
"model": "app.pricingplan",
"fields": {
"name": "Базовый",
}
},
{
"pk": 2,
"model": "app.pricingplan",
"fields": {
"name": "Хуязовый",
}
}
]
</code>
</pre>
Forked from an [old versions snippet](https://djangosnippets.org/snippets/2258/)
- pretty
- dumpdata
- pretty-print