def direct_to_template(request, template, extra_context=None, **kwargs):
    context = extra_context or {}
    context["params"] = kwargs
    for (key, value) in context.items():
        if callable(value):
            context[key] = value()
    return TemplateResponse(request, template, context)
Replacement for Django's ``direct_to_template`` that uses
dataset/ETHPy150Open stephenmcd/mezzanine/mezzanine/core/views.py/direct_to_template