@api_view((u'GET',))
@renderer_classes((TemplateHTMLRenderer,))
def example(request):
 data = {u'object': u'foobar'}
 return Response(data, template_name=u'example.html')

@ api_view ( ( u'GET' , ) ) @ renderer_classes ( ( TemplateHTMLRenderer , ) ) def example ( request ) : data = { u'object' : u'foobar' } return Response ( data , template_name = u'example.html' )
a view that can returns an html representation .