I’m using Django and jquery, implementing jPicker http://www.digitalmagicpro.com/jPicker/ in my web application. Here I’m getting broken images on jPicker color display. When I check the server code it shows like this
"GET /files/css/jPicker-1.1.6.min.css HTTP/1.1" 304 0
"GET /files/css/jPicker.css HTTP/1.1" 304 0
"GET /files/js/jquery-1.7.1.min.js HTTP/1.1" 304 0
"GET /files/js/jpicker-1.1.6.min.js HTTP/1.1" 304 0
"GET /jPicker/images/mappoint.gif HTTP/1.1" 404 3209
"GET /jPicker/images/rangearrows.gif HTTP/1.1" 404 3218
"GET /jPicker/images/Maps.png HTTP/1.1" 404 3197
"GET /jPicker/images/map-opacity.png HTTP/1.1" 404 3218
"GET /jPicker/images/Bars.png HTTP/1.1" 404 3197
"GET /jPicker/images/bar-opacity.png HTTP/1.1" 404 3218
"GET /jPicker/images/AlphaBar.png HTTP/1.1" 404 3209
"GET /jPicker/images/preview-opacity.png HTTP/1.1" 404 3230
"GET /jPicker/images/NoColor.png HTTP/1.1" 404 3206
The image files are not found there showing 404, but I linked the images folder inside the css folder correctly.
/home/nirmal/try/files/css/images/
/home/nirmal/try/files/css/jPicker.css
/home/nirmal/try/files/css/jPicker-1.1.6.min.css
/home/nirmal/try/files/js/jquery-1.7.1.min.js
/home/nirmal/try/files/js/jpicker-1.1.6.min.js
My Django settings are
MEDIA_ROOT = '/home/nirmal/try/files/'
MEDIA_URL = 'http://localhost:8000/files/'
What mistake I’ve done that makes the images to be on jPicker/images and not found?
Thanks!
jPicker has a default variable that states where the images folder is located:
You should overwrite this default to
images.clientPath = '/files/css/images/', for instance like:See also the section ‘Settings’ at http://www.digitalmagicpro.com/jPicker/ (to bad I can not link the exact location, but Ctrl + F is your friend).
good luck,
Wout