I have a simple HTML page (main.html) rendered via jinja2/flask.
main.html
{% extends 'layout.html' %}
{% include 'content1.html' %}
{% include 'widget1.html' %}
{% include 'widget2.html' %}
layout.html includes some CSS (bootstrap), JS and some HTML (header/menu) for all pages.
I was hoping to very simply include within this html page, a few content templates and a few 'widgets'. The widgets are more complex in that they include their own JS and CSS (bootstrap) ... This is causing trouble as the CSS within widget1.html is overriding the CSS of the main.html (not unexpected given the include).
Is there some way to 'include' widget1.html without actually having the CSS/JS within come back to the parent page (main.html)?
I'd prefer to not have to refactor widget1.html as it is an external app. Is there a simple solution here?
Thanks in advance!