📜  创建夹具 django - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:01.949000             🧑  作者: Mango

代码示例1
To dump data:
python manage.py dumpdata app.model_name --indent 4 > fixtures/file_name.json

To load data:
python manage.py loaddata fixtures/model_name.json --app app.model_name