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',
...
}),
Source:stackexchange.com