7👍
✅
def post(self, request, *args, **kwargs):
self.object = self.get_object() #Add this to load the object
#Your code
return HttpResponse(html)
PS: Please use Django template 😉
Source:stackexchange.com