问题:
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