def mime_type(template):
    """ infer the content-type from the extension """
    _, ext = os.path.splitext(template.filename)
    return EXTENSION_MAP.get(ext, 'text/html; charset=utf-8')
def mime_type ( template ) : _ , ext = os . path . splitext ( template . filename ) return EXTENSION_MAP . get ( ext , 'text/html; charset=utf-8' )
infer the content-type from the extension