如何完全转储Django-CMS的数据 [英] How to completely dump the data for Django-CMS

查看:199
本文介绍了如何完全转储Django-CMS的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Django-CMS的实例已在生产环境中运行。我想转储所有与CMS相关的数据(PAGES和PLUGINS),以便我可以将其加载回我的开发环境。



当我做 python manage.py dumpdata cms 时,它会转储大部分数据,不会转储插件的任何内容。当我看到django-cms源,我看到插件被组织在一个不同的文件夹,而不是其余的模型 - 我相信这有关的行为 dumpdata



有谁知道他们将如何实现我想做的事?



感谢您的帮助/答案!

解决方案

Django内置的转储和恢复命令适用于迁移CMS的内容。 / p>

要转储CMS的内容,您需要同时包括cms应用程序以及您在dumpdata命令中使用的每个插件类型,因此类似:

  manage.py dumpdata cms文字图片链接文件[其他插件类型]> cms_export.json 

转储您的内容(您只需要应用名称,而不是完整路径,例如 cms.plugins.text )。


I have an instance of Django-CMS already running in a production environment. I would like to dump all the data related to the CMS (PAGES and PLUGINS) so that I may load it back into my development environment.

When I do python manage.py dumpdata cms it dumps most of the data, but not all of it. None of the content for the plugins is dumped. When I look at the django-cms source, I see that the plugins are organized in a different folder than the rest of the models - I'm sure this has something to do with the behavior of dumpdata.

Does anyone know how they would achieve what I am trying to do?

Thanks for your help/answers!

解决方案

Django's built in dump and restore commands work well for migrating the contents of the CMS.

To dump the contents of the CMS, you need to include both the cms app as well as each of the plugin types you are using in the dumpdata command, so something like:

manage.py dumpdata cms text picture link file [other plugin types] > cms_export.json

to dump your content (you just need the app name, not the full path, like cms.plugins.text).

这篇关于如何完全转储Django-CMS的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆