На Thu, 14 Jun 2012 11:45:19 +0530
Satvir Toor <toor.satvi...@gmail.com> написа:

> 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))
> 

Why don't you use static files?

> Now, The image is not availble into the html file that is displaying
> in browser, Tell me where  I m wrong.

You better show us the template too.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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