Can someone help me with Django-ratings app? I'm trying to post a rating but the app doesn't seem to do anything. What part am I missing here? Really hard to find examples out there..
My function looks like this (jquery Raty plugin):
$('.raty').raty({
click: function(score, evt) {
var vote_url = "/rate/" + $(this).attr('value') + "/" + score + "/" ;
$.ajax({
url: vote_url,
type: "GET",
success: function(){
alert('Vote successful!');
}
});
}
});
The GET seems to work but i can see in my admin that no votes/scores are registered.
In my URL:
url(r'rate/(?P<object_id>\d+)/(?P<score>\d+)/', AddRatingFromModel(), {
'app_label': 'myapp',
'model': 'MyModel',
'field_name': 'rating',
}),
EDIT:
I'm getting a 404 error "Invalid model or app_label". But I'm pretty sure thoose are the correct ones.