[Django]-How to insert multiple images into a blog post not File field upload (Django blog)

6👍

You could add the images manually in the text field as html like <img src="#">. Then in the template use the “safe” filter. So post.text|safe. That will render your html.

But that only solves a part of your problem, because you need an easy way of uploading images to the server and inserting them into blog posts.

What you really need is a WYSIWYG editor. Here’s a list https://djangopackages.org/grids/g/wysiwyg/

Django-ckeditor and tinymce are both pretty good. You can find tutorials for how to set those up in their respective docs.

Leave a comment