Re: image in browser

2012-06-14 Thread Satvir Toor
On Thu, Jun 14, 2012 at 3:33 PM, kenneth gonsalves wrote: > from the questions you have been asking on the list it seems to me that > you are unfamiliar with web programming. I suggest that you take some > time out to learn the basics of web programming and also to understand > how django works. I

Re: image in browser

2012-06-14 Thread Satvir Toor
> You better show us the template too. Problem solved. Image is displaying just putting the image into the localhost directories(/var/www/logo.png) and giving the src attribute as http://localhost/logo.png"; `width="200" height="200" alt="image is not available" align="right"/> -- Satvir Kaur sa

Re: image in browser

2012-06-14 Thread Ivan Ivanov
На Thu, 14 Jun 2012 14:21:00 +0530 Satvir Toor написа: > > This is a strange thing to want to do. What are you doing with > > `img` in the template? > I am using image_data variable as a image source in the template(html > file). > > > What should i ??? Image is not displaying. Use static fil

Re: image in browser

2012-06-14 Thread Christian Jurk
Why would you do that this way? The usual way would be to put your images into the static files and serve it from there. However, you should be able to do it that way using base64 encoding of the binary data: from base64 import b64encode def my_image(request): image_data = open("/home/toor

Re: image in browser

2012-06-14 Thread Ivan Ivanov
На Thu, 14 Jun 2012 11:45:19 +0530 Satvir Toor написа: > 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/Desk

Re: image in browser

2012-06-14 Thread kenneth gonsalves
On Thu, 2012-06-14 at 14:21 +0530, Satvir Toor wrote: > > This is a strange thing to want to do. What are you doing with `img` > in the > > template? > I am using image_data variable as a image source in the template(html > file). > > > What should i ??? Image is not displaying. > > from the

Re: image in browser

2012-06-14 Thread Satvir Toor
On Thu, Jun 14, 2012 at 2:32 PM, Daniel Roseman wrote: > On Thursday, 14 June 2012 09:51:00 UTC+1, Satvir Kaur wrote: >> >> > This is a strange thing to want to do. What are you doing with `img` in >> > the >> > template? >> I am using image_data variable as a image source in the template(html >>

Re: image in browser

2012-06-14 Thread kooliah
Why don't you use staticfiles? https://docs.djangoproject.com/en/dev/howto/static-files/ On 06/14/2012 08:15 AM, Satvir Toor 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

Re: image in browser

2012-06-14 Thread Daniel Roseman
On Thursday, 14 June 2012 09:51:00 UTC+1, Satvir Kaur wrote: > > > This is a strange thing to want to do. What are you doing with `img` in > the > > template? > I am using image_data variable as a image source in the template(html > file). > > > What should i ??? Image is not displaying. >

Re: image in browser

2012-06-14 Thread Satvir Toor
> This is a strange thing to want to do. What are you doing with `img` in the > template? I am using image_data variable as a image source in the template(html file). What should i ??? Image is not displaying. -- Satvir Kaur satveerkaur.blogspot.in -- You received this message because you

Re: image in browser

2012-06-14 Thread Daniel Roseman
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/