I am trying to get jquery.raty working with Django. I have the serving of static-files perfectly setup, however it seems it has a problem finding the rating image files after all.
This is how I have set it up:
base.html (static loads here fine)
<script src="{{ STATIC_URL }}raty/js/jquery.raty.min.js"></script>
template:
<div id="star"></div>
js
$('#star').raty({
cancel : true,
cancelOff : 'cancel-off-big.png',
cancelOn : 'cancel-on-big.png',
half : true,
size : 24,
starHalf : 'star-half-big.png',
starOff : 'star-off-big.png',
starOn : 'star-on-big.png'
});
but instead of stars I see alternate text numbers:
And this is the message I get from server when refreshing the page:
[07/Oct/2012 21:03:48] "GET /contact/add/img/star-off-big.png HTTP/1.1" 200 9941
I don't understand why it looks at current location (http://127.0.0.1:8000/contact/add/) and appends /img/xxx.png
to the /contact/add/
.
How do I set the path to the images in the javascript using a STATIC_URL path?
Would really appreciate your help on this.