Hi Ken,
I was initially trying to use Summernote. After facing this issue, I thought it may be related with Summernote so I changed the ModelAdmin to the following:
I’m simply trying to include “blog_body” field into the “blog-post.html” template directly from admin panel. I was partially successful with Summernote but even with it I couldn’t get the img tag loaded successfully. This was before switching to plain admin panel for testing.
If I’m following you, the real issue here is that you have template tags within data being rendered within a template.
If this is the issue, then no, the Django template engine will not perform these recursive renderings for you.
If you’ve got data being rendered, and this data also needs to be rendered, you need to render that data yourself and pass that rendered text as the data into the context of the template being rendered.
I see …
All I wanted to make all the css formatting and html parts of the blog_body field from admin panel and include this field into blog_post.html as: {{ single_post.blog_body | safe }}.
This was going to really make my process easier. I partially managed this with Summernote. I was able to send the blog_body to blog_post.html by using {{ single_post.blog_body | safe }} in blog_post.html. Everything was looking great except <img src="{% static 'assets/img/photos/about14.jpg' %}" alt="image">.
There is no remedy for this I guess. Thank you for your time Ken.
I really appreciate your quick response and directing me to the right path.