問題:
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