开发者

How can I create prettier fixtures with manage.py dumpdata?

开发者 https://www.devze.com 2022-12-24 10:39 出处:网络
I\'m trying to get my Django fixtures printed in a prettier way. I\'ve outputting the fixtures: python manage.py dumpdata >> fixture_app.json

I'm trying to get my Django fixtures printed in a prettier way.

I've outputting the fixtures:

python manage.py dumpdata >> fixture_app.json

This creates a file with 1000's of characters all on one line. When I try to view the file with my Text Editor( TextMate ), the Editor hangs.

Is there anyway that the fixtures can be exported in a 开发者_Go百科prettier way using multiple lines?


You can try:

python manage.py dumpdata --indent=2

it will be easier to read.

0

精彩评论

暂无评论...
验证码 换一张
取 消