Django平板备份? [英] Django flatpages backup?
本文介绍了Django平板备份?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用平版页在我的网站,在本地服务器上开发。我需要备份flatpage的数据,以便在最终的服务器中使用它。有没有人知道如何做?
I'm using flatpages in a site that I'm developing in a locally server. I need to backup the flatpage's data for use it in the final server. Does anyone know how to do it?
推荐答案
在您的本地服务器上运行:
On your local server run this:
python manage.py dumpdata flatpages --indent=2 > backup.json
然后将backup.json复制到最终的服务器并加载:
Then copy backup.json to your final server and load it with:
python manage.py loaddata backup.json
这篇关于Django平板备份?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文