1👍
✅
I’m not going to ask why you’re doing this, but to do so, pass the view into the hv
view function you just generated.
def some_view(request):
view = generic.TemplateView.as_view(template_name='foobar')
return view(request)
or
hv = HomeViews.as_view()
response = hv(request)
Source:stackexchange.com