주어진 템플릿을 jinja로 렌더링합니다

    :param template_name:
    :return:

def render(template_name, extra_environments=None, **kwargs):
    """주어진 템플릿을 jinja로 렌더링합니다

    :param template_name:
    :return:

    """
    if extra_environments is None:
        extra_environments = {}
    default_loader = PackageLoader('dodotable', 'templates')
    loader = extra_environments.get(
        'template_loader',
        default_loader)
    if not loader:
        loader = default_loader
    get_translations = extra_environments.get('get_translations')
    env = Environment(loader=loader,
                      extensions=['jinja2.ext.i18n', 'jinja2.ext.with_'],
                      autoescape=True)
    env.globals.update(extra_environments)
    translations = get_translations() if callable(get_translations) else None
    if translations is None:
        translations = gettext.NullTranslations()
    env.install_gettext_translations(translations)
    template = env.get_template(template_name)
    return template.render(**kwargs)