This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
2018-11-16 09:08:15 +00:00
|
|
|
"""passbook lib template utilities"""
|
2020-09-16 19:54:35 +00:00
|
|
|
from django.template import Context, loader
|
2018-11-16 09:08:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
def render_to_string(template_path: str, ctx: Context) -> str:
|
|
|
|
"""Render a template to string"""
|
|
|
|
template = loader.get_template(template_path)
|
|
|
|
return template.render(ctx)
|