Re: displaying image in a template

2009-05-17 Thread Michael
On Sun, May 17, 2009 at 2:54 AM, newbie wrote: > > > Hi, > >I followed those steps in the link and its working fine for > static files (like css scripts etc). But when i'm trying to display an > image, its not working. I'm trying to display an image which is in >

Re: displaying image in a template

2009-05-17 Thread newbie
Hi, I followed those steps in the link and its working fine for static files (like css scripts etc). But when i'm trying to display an image, its not working. I'm trying to display an image which is in static/barcodeimages directory (static is the directory to which i set all static

Re: displaying image in a template

2009-05-16 Thread newbie
according to the link http://docs.djangoproject.com/en/dev/howto/static-files/ site_media is the URL where your media will be rooted and The file / path/to/media/foo.jpg will be made available at the URL /site_media/ foo.jpg. so i thought the file which is at

Re: displaying image in a template

2009-05-16 Thread Daniel Roseman
On May 16, 9:19 pm, newbie wrote: > Hi, > >          Thanks for your immediate  reply. I've seen the document and > followed the steps in it already. But was not able achieve any > progress. In > > (r'^site_media/(?P.*)$', 'django.views.static.serve', > {'document_root':

Re: displaying image in a template

2009-05-16 Thread newbie
Hi, Thanks for your immediate reply. I've seen the document and followed the steps in it already. But was not able achieve any progress. In (r'^site_media/(?P.*)$', 'django.views.static.serve', {'document_root': '/path/to/media'}), does site_media mean the directory in which the

Re: displaying image in a template

2009-05-16 Thread Daniel Roseman
On May 16, 7:37 pm, newbie wrote: > Hi, > >          I want to display an image from static files directory in a > template. The name of the image is stored in a variable(say image). > When i try to display it in the template using img tag( src = > {{ image }} ), its not

displaying image in a template

2009-05-16 Thread newbie
Hi, I want to display an image from static files directory in a template. The name of the image is stored in a variable(say image). When i try to display it in the template using img tag( src = {{ image }} ), its not displayed. Can someone help me in this regard. Thanks, nazgi.