[Answer]-Django-ratings – 404 error "Invalid model or app_label"? Why?

1👍

This applications does not need the POST request. The easiest way to solve the problem is to set ‘GET’ method in ajax request

$.ajax({
    ...
    type: 'GET'
    ...

To avoid 404 you need to write model name in lowercase. In django.contrib.contenttypes app_label and model use lowercase.

url(r'rate/(?P<object_id>\d+)/(?P<score>\d+)/', AddRatingFromModel(), {
...
  'model': 'mymodel',
...
}),

Leave a comment