I have in my url patterns,
urlpatterns += patterns('',
(r'^(?P<path>.*)$', 'django.views.static.serve',
{'document_root': '/home/tipu/Dropbox/dev/workspace/search/images'})
In my template when I do
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}style.css" />
It serves the css just fine. But the file logo.png, that's in the same directory as style.css, doesn't show when I do this:
<img src = "{{ MEDIA_URL }}logo.png" id = "logo" />
Any idea why?
Edit:
Here they are in the same directory: http://i.imgur.com/Wlssb.png
root@tipu_ubuntu:/home/tipu/Dropbox/dev/workspace/search# curl -I http://localhost:8080/logo.png
HTTP/1.1 404 Not Found
Date: Sun, 30 May 2010 19:56:54 GMT
Server: Apache/2.2.14 (Ubuntu)
Vary: Accept-Encoding
Connection: close
Content-Type: text/html; charset=iso-8859-1
root@tipu_ubuntu:/home/tipu/Dropbox/dev/workspace/search# curl -I http://localhost:8080/style.css
HTTP/1.1 200 OK
Date: Sun, 30 May 2010 19:57:06 GMT
Server: Apache/2.2.14 (Ubuntu)
Last-Modified: Thu, 27 May 2010 03:28:14 GMT
Content-Length: 1447
Content-Type: text/css
Vary: Accept-Encoding
Connection: close