Currently, I have the following code:
from django.shortcuts import render
# ...
def prerender(js: json) -> str:
# ...
response = render(None, 'partial/name.html', context)
return response.content.decode()
Is there a way in Django to render to a string rather than to the bytes of HttpResponse? Otherwise, how to get HttpResponse content as a string properly?