I want to save HTML code inside my Postgresql database so that I can directly send this code as HttpResponse instead of serving static HTML file. I did saved it inside database but following error keeps on coming.

What is correct way of doing this task?
Edit1: code of views.py file
def index(request):
index_object = StaticWebPage.objects.get(page_title='index')
return HttpResponse(
request,
index_object.page_content
)