I'm including ads in my project's html files i was using GIF files Upload it in the admin and use it like
:
{{ ad.image.url }}
but then the client wanted the ad to be HTML file (with js, CSS files) i thought of:
and the main problem is how to inject/include the HTML file content to my HTML page?
Please share your ideas
you can create an upload page for image / css and js files.
and a single html file stored into models or file.
in your view you can load content of html file then pass it to template then render content of passed parameter
{{ file_content|safe }}
also you can use iframe to show page content
also to create html file you can use one WYSIWYG
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.