Implement TemplateResponseMixin.