On Sun, May 17, 2009 at 2:54 AM, newbie <mara.ku...@gmail.com> 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
> static/barcodeimages directory (static is the directory to which i set
> all static files should be served). So when i try  <img src =
> {{ imagepath }}> {{ imagepath }}
>
>  where imagepath = "/barcodeimages/image.png" its not working
>

The issue here is right in front of you:  "/barcodeimages/image.png"
!= "/static/barcodeimages/image.png"

If you want to serve images from the barcodeimages root directory you must
set up the static server to server that directory the same way.

Debugging this is easy. Just go to the URL that you are requesting and if
you get a 404, it's not there. If you get an image it is. If you go
to: "/static/barcodeimages/image.png" my bet is that the image is there.

I hope that helps,

Michael

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