:param name: the name of the template file, must exist inside of the configured ``template_folder`` parameter of the class constructor.
        :param context: a dictionary whose keys will be available within the target template file.
        :param content_type: a string with the content-type. Defaults to ``text/html`` but can be modified when serving a ``plain/text`` for example.
        :param code: the http status code
        :param minify: bool - whether to minify the final html.

def template_response(self, name, context=None, content_type='text/html', code=200, minify=True):
        """
        :param name: the name of the template file, must exist inside of the configured ``template_folder`` parameter of the class constructor.
        :param context: a dictionary whose keys will be available within the target template file.
        :param content_type: a string with the content-type. Defaults to ``text/html`` but can be modified when serving a ``plain/text`` for example.
        :param code: the http status code
        :param minify: bool - whether to minify the final html.
        """
        context = OrderedDict(context or {})
        context['json'] = json
        context['full_url_for'] = full_url_for

        utf8 = render_template(name, **context)
        if minify:
            mini = htmlmin.minify(utf8, remove_comments=True, remove_empty_space=True, remove_all_empty_space=True, reduce_boolean_attributes=True, remove_optional_attribute_quotes=True)
        else:
            mini = utf8

        return Response(mini, headers={
            'Content-Type': content_type,
            'Content-Encoding': 'UTF-8',
        }, status=code)