changed the template.TemplateSyntaxError raising pattern to something slightly more efficient.