aboutsummaryrefslogtreecommitdiffstats
path: root/fatcat_scholar/web.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-05-21 11:55:14 -0700
committerBryan Newbold <bnewbold@archive.org>2020-05-21 11:55:14 -0700
commit6c4f539463074bcb563675b6e4f19464339e5641 (patch)
treeda03b907da1ffe5fd582b6450ae3dbeb95f23b1b /fatcat_scholar/web.py
parent13c956969e88f3f740e81d98a275fc63833b9e24 (diff)
downloadfatcat-scholar-6c4f539463074bcb563675b6e4f19464339e5641.tar.gz
fatcat-scholar-6c4f539463074bcb563675b6e4f19464339e5641.zip
less whitespace in jinja2 output
Diffstat (limited to 'fatcat_scholar/web.py')
-rw-r--r--fatcat_scholar/web.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/fatcat_scholar/web.py b/fatcat_scholar/web.py
index e1ef478..a148c8b 100644
--- a/fatcat_scholar/web.py
+++ b/fatcat_scholar/web.py
@@ -105,6 +105,10 @@ def load_i18n_templates():
locale_ngettext(translations),
newstyle=True,
)
+ # remove a lot of whitespace in HTML output with these configs
+ templates.env.trim_blocks = True
+ templates.env.istrip_blocks = True
+ # pass-through application settings to be available in templates
templates.env.globals['settings'] = settings
d[lang_opt] = templates
return d