Django轉儲單個模型的數據? - Django dump data for a single model?

問題:

Can I perform a dumpdata in Django on just a single model, rather than the whole app, and if so, how?我可以僅在單個模型上而不是整個應用程序中在Django中執行dumpdata嗎?如果可以,如何執行?

For an app it would be:對於一個應用程序,它將是:

python manage.py dumpdata myapp

However, I want some specific model, such as "myapp.mymodel" to be dumped.但是,我希望轉儲某些特定的模型,例如“ myapp.mymodel”。 The reason being, I have some huge, 3 million records plus, datasets in the same app that I would not like dumped.原因是,在我不希望轉儲的同一應用程序中,我有300萬條巨大的記錄集。


解決方案:

參考一: https://en.stackoom.com/question/4fZA
參考二: https://stackoom.com/question/4fZA
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章