code: 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)
docs: Replacement for Django's ``direct_to_template`` that uses
      ``TemplateResponse`` via ``yacms.utils.views.render``.