import PageTemplateLoader later so that os.environ is taken into account