Importing existing blog posts into django-cms-blog

98 views Asked by At

I am integrating an existing web-application into django-cms. So far, my application had a blog application not from django-cms, which currently contains several thousand blog-posts. Im trying to import them into the django-cms-blog application.

Until now, I have imported all fields successfully, such as title, category, ... into the django-cms-blogpost model except for the Placeholder fields, where the content of blogs is saved in.

I know that I can access it from the frontend, but this way I would have to copy all the content of the previous blog-posts manually into the current. So my question is: Is it possible to add content to placeholders from the backend?

1

There are 1 answers

0
sodimel On

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).