Django flatpages backup?

前端 未结 1 1818
青春惊慌失措
青春惊慌失措 2021-02-04 08:02

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条回答
  •  礼貌的吻别
    2021-02-04 08:50

    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
    

    0 讨论(0)
提交回复
热议问题