On Thursday, 14 June 2012 07:15:19 UTC+1, Satvir Kaur wrote:
>
> hello, 
>
> i wish to display the image into the browser through a template . I 
> used the following code to retrieve the image from Disk and send that 
> data to Html file 
>
> def my_image(request): 
>     image_data = open("/home/toor/Desktop/certificate/logo.png", 
> "rb").read() 
>     return render_to_response('myapp/bio.html', {'img':image_data}, 
> context_instance=RequestContext(request)) 
>
>
> Now, The image is not availble into the html file that is displaying 
> in browser, Tell me where  I m wrong. 
>
>
> -- 
> Satvir Kaur 
>


This is a strange thing to want to do. What are you doing with `img` in the 
template?
--
DR.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/U6RaTow-dJQJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to