aboutsummaryrefslogtreecommitdiffstats
path: root/fatcat_scholar/query_fatcat.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2022-08-12 12:20:25 -0700
committerBryan Newbold <bnewbold@archive.org>2022-08-12 12:22:20 -0700
commit9cb5c59114b174a7eb8ec1065ff3321c0b1b86a4 (patch)
treeb533928514866bbd97fd8dc3f35eed9ee1ce8741 /fatcat_scholar/query_fatcat.py
parentcc8a89d9d4a529af3eb87d50ed2ff36051e674f3 (diff)
downloadfatcat-scholar-9cb5c59114b174a7eb8ec1065ff3321c0b1b86a4.tar.gz
fatcat-scholar-9cb5c59114b174a7eb8ec1065ff3321c0b1b86a4.zip
web: refactor i18n template loading
This is an attempt to fix a bug with random HTML template escapes in production. I believe these are being caused by cross-request contamination of template state due to using globals to hold on to per-language jinja2 templates. I originally thought this might be a bug in the jinja2 i18n extension itself, and there may still be concurrency concerns there, but it seems like the proximal cause is the use of globals. This change probably has a negative performance impact, because the jinja2 environment is re-created on every request (though babel files are not reloaded on every request).
Diffstat (limited to 'fatcat_scholar/query_fatcat.py')
0 files changed, 0 insertions, 0 deletions