Pretty large string; could this be moved into a Jinja template? Any reason to have it in pure Python?