Django dump data for a single model?

前端 未结 9 2022
故里飘歌
故里飘歌 2020-12-04 05:42

Can I perform a dumpdata in Django on just a single model, rather than the whole app, and if so, how?

For an app it would be:

python man         


        
9条回答
  •  甜味超标
    2020-12-04 06:13

    I think you had the solution in your question. You can dump an individual model like this:

    ./manage.py dumpdata myapp.my_model
    

提交回复
热议问题