About Passing HTML Content to an Iframe
Without JavaScript, you can pass the HTML content to an iframe
using the srcdoc
attribute.
<iframe srcdoc="{{ obj.get_preview_html }}" />
Tips and Tricks Programming Django 4.2 Django 3.2 Django 2.2 Django 1.11 Django 1.8 HTML5
Also by me
Django Paddle Subscriptions app
For Django-based SaaS projects.
Django GDPR Cookie Consent app
For Django websites that use cookies.