You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Okay, this implies something must be going on with the way settings are passed in. The default for jinja2 is to have autoreload on, but more.jinja2 turns this off in its own get_setting_section code. It's possible that for some reason this setting doesn't get overridden by your own setting section call.
To help debug this, could you try changing the code in more.jinja2 directly that sets the auto_reload to False and make it be True? If it works then, then we know we have a problem overriding settings. If it doesn't work, then we for some reason break the template reloading in Jinja2 in general.
As per your instruction I tried setting auto_reload to True in both
get_setting_section and get_jinja2_loader(template_directories, settings) in more.jinja2/more/jinja2/main.py. Didn't work.
I tried setting a breakpoint in ninja2....-egg/jinja2/environment.py and found that auto_reload kwarg was set to True. So it seems that the configuration process is OK.
Breaking in get_jinja2_render(loader, name, original_render) I see that the template object correctly detects changes to the template (as indicated by the template.is_up_to_date property). However stale content is returned.
I won't pretend to understand what's going on at the end of get_jinja2_render....
I have a settings section (as per docs) like:
But changes to ninja templates are not automatically reloaded on page reload. The whole app needs to be restarted for the changes to show.
The text was updated successfully, but these errors were encountered: