Re: Javascript-Django image paths

2007-06-25 Thread robo
> I don't mean to offend you, but I think you've misunderstood how the > web works. There's really no difference in the HTTP request of a > human clicking a link and the HTTP request caused by an image tag (or > javascript image.src assignment). I thought that way because I couldn't find any ot

Re: Javascript-Django image paths

2007-06-24 Thread Brett Parker
On Mon, Jun 25, 2007 at 03:43:51AM -, robo wrote: > function show_img(suf, val) { > img = document.getElementById('image_' + val); > img.src = 'images/schematics/SKU' + suf + '.jpg'; ^ put a / here... img.src = '/images/schematics/SKU' + suf

Re: Javascript-Django image paths

2007-06-24 Thread Jeremy Dunck
On 6/24/07, robo <[EMAIL PROTECTED]> wrote: > (r'^images/schematics/(?P.*)$', 'django.views.static.serve', > {'document_root': '/www/htdocs/gfs_chefrevival/images/schematics'}), ... I think you want a trailing slash after path: r'^images/schematics/(?P.*)/$' > I also suspect that this doesn't w

Re: Javascript-Django image paths

2007-06-24 Thread robo
You've answered your question intended for me :P I've tried serving static files with as many combinations as I could think of in the following form: (r'^images/schematics/(?P.*)$', 'django.views.static.serve', {'document_root': '/www/htdocs/gfs_chefrevival/images/schematics'}), and matched it w

Re: Javascript-Django image paths

2007-06-24 Thread [EMAIL PROTECTED]
Hello, > The images show when I do a static, non-django html page. But when > this code is within django, it doesn't show and I think it's because > django does not deal with javascript paths. What do you mean - "does not deal"? Once the page is rendered, django has nothing to do with it. And sinc