class Lookup(TemplateLookup):

    def get_template(self, uri):
        if uri.rsplit('.')[1] == 'haml':
            default = self.template_args['preprocessor']
Choose Mako preprocessor based on file extension?