aboutsummaryrefslogtreecommitdiffstats
path: root/fatcat_scholar/web_hacks.py
Commit message (Collapse)AuthorAgeFilesLines
* web: persist and reuse template loader across requestsBryan Newbold2022-08-121-8/+8
|
* web: refactor i18n template loadingBryan Newbold2022-08-121-0/+84
| | | | | | | | | | | | | | | 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).
* rename fatcat_scholar.hacks to fatcat_scholar.web_hacksBryan Newbold2022-08-121-0/+179