Tumblelog by Soup.io
Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

Do Not Escape Characters When Using dumpdata Command (Tested in Django 1.11)

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

  "pk": 1, 
  "model": "app.pricingplan", 
  "fields": {
   "name": "\u0411\u0430\u0437\u043e\u0432\u044b\u0439", 
  "pk": 2, 
  "model": "app.pricingplan", 
  "fields": {
   "name": "\u0425\u0443 ...

Don't be the product, buy the product!