'Iterate over candidate files for template_name.
Ignore files that don\'t lie inside configured template dirs to avoid
directory traversal attacks.'

def iter_template_filenames(self, template_name):

    for template_dir in self.template_dirs:
        with suppress(SuspiciousFileOperation):
            (yield safe_join(template_dir, template_name))
