-
-
Notifications
You must be signed in to change notification settings - Fork 18
collected_js and collected_css are not reset when rendering new jinja templates #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
JinjaX is not meant to be used like that, would this work for you? env = jinja2.Environment(
loader=jinja2.PackageLoader('udb'),
auto_reload=True,
autoescape=True,
trim_blocks=True,
lstrip_blocks=True,
extensions=['jinja2.ext.i18n'],
)
catalog = jinjax.Catalog(jinja_env=env, root_url="/static/")
catalog.add_folder(resource_filename('udb', 'templates/components'))
html1 = catalog.render("templates1")
# ...
html2 = catalog.render("templates2") |
I have issue with this approach because the framework I'm using required a jinja_env to work with. Not a Catalog. Also, not all my templates are define (or converted to components) yet. To my knowledge, calling That also make me wonder, are |
They were not thread safe. |
Hello,
I'm having issued with JinjaX collected list of javascript and css.
Creating a small snippet to reproduce the problem is not that easy, but here is a pseudo code of the problem:
Possible I'm using the library the wrong way. So don't hesitate to correct me.
Thanks
The text was updated successfully, but these errors were encountered: