2

我正在将现有的 Web 应用程序集成到 django-cms 中。到目前为止,我的应用程序有一个不是来自 django-cms 的博客应用程序,它目前包含数千篇博客文章。我试图将它们导入 django-cms-blog 应用程序。

到目前为止,我已经成功地将所有字段,例如标题,类别,...导入到 django-cms-blogpost 模型中,除了保存博客内容的占位符字段。

我知道我可以从前端访问它,但这样我就必须手动将以前博客文章的所有内容复制到当前。所以我的问题是:是否可以从后端向占位符添加内容?

4

1 回答 1

0

We did this when importing blog posts from a custom blog engine to djangocms-blog:

blog_post.content = old_blog_post.body_placeholder

This line is from our main loop, where we iterate over all the old blog posts and we create new blog posts (and the translations).

于 2021-06-01T12:40:24.557 回答