I am new to Django and I am creating a blog app. Now I want to write some HTML in my blog post content field which is text field in order add some headings and images.
I also add an Image model inline to the post model in the admin page and I try to write it like this but it just prints the HTML and doesn’t actually print the image.
Yes I tried the safe filter and I also modified the generic detail view to render the post content html myself and now it works as I wanted it to work I just wondered if there was a django built-in way to do it instead of me manually using beautiful soup but that is fine for me.
Here are the screenshots of admin panel, view code and template code.
If you surround blocks of code with three backticks (```) on their own line, then it will be formatted correctly and, I think, automatically syntax highlighted.