views:

15

answers:

1

how would I embedded generated image inside django template?

something like

return render_to_response('graph.html', { 'img': get_graph() })

I don't want this - because it just send image

http.HttpResponse(get_graph(), mimetype="image/png")
A: 

You can base64-encode the image data and use a data URI.

James Bennett