'Render a Custom Template to string.'

def render_template(self, template_text, tag_require='', context=None):

    context = (context or {})
    template = Template(('{%%    load    %s    %%}    %s' % (tag_require, template_text)))
    return template.render(Context(context))
