using dominate python to generate templates