summaryrefslogtreecommitdiff
path: root/pystache/init.py
blob: 4544974e2c2e5383ccf58f97115665c7c8721097 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# encoding: utf-8

from .template import Template
from .view import View
from .loader import Loader

__all__ = ['Template', 'View', 'Loader', 'render']


def render(template, context=None, **kwargs):

    context = context and context.copy() or {}
    context.update(kwargs)

    return Template(template, context).render()