I'm working on a Django project that accesses different tables from my database and outputting that information all on one page. The way I'm doing that is:
a = get_hostname(request, hostname)
b = get_systeam(request, hostname)
c = get_appteam(request, hostname)
response = HttpResponse()
response.write(a)
response.write(b)
response.write(c)
return HttpResponse(response)
Where all the called functions return HTTPresponse objects through render_to_response methods. When I use Javascript to see the concatenated html, there are multiple Content-Type:text/html; charset=utf-8 that appear on the page.
<h2>
<div class ="row">
<center>
<div class ="col-md-3 col-md-offset-3">
<h1>Hostname: xxxxxxx </h1>
</div>
</h2>
Content-Type: text/html; charset=utf-8
<h3>
<div class ="row">
<div class ="col-md-3 col-md-offset-2">
<h1>System Team: xxxxxx </h1>
</div>
Content-Type: text/html; charset=utf-8
<div class = "col-md-3 col-md-offset-2">
<h1>Application Team: xxxxxxxx </h1>
</div>
</div>
</h3>
I have a feeling the meta tag in what is my base.html isn't being passed so when the html chunks are being rendered they automatically add the Content-Type lines. Any help is appreciated!