Django flatpages backup?

我是研究僧i 提交于 2020-01-22 07:15:06

问题


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?


回答1:


On your local server run this:

python manage.py dumpdata flatpages --indent=2 > backup.json

Then copy backup.json to your final server and load it with:

python manage.py loaddata backup.json


来源:https://stackoverflow.com/questions/617860/django-flatpages-backup

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!