Has anyone made a project with a like or upvote option that uses an AJAX call? in django I mean without reloading like/upvote . I have been a whole day trying to stack overflow’s old codes and other blogs’ old codes.. nothing working..
I get a 404 URL not found in the console for the url passed with the AJAX call. although url is 💯 correct..
Drop some django projects with the mentioned features that you have done, tried or that you have seen working.
finally it worked
cause: The cause was that I was using get_object_or_404() method in views which returned 404 when object wasn’t found and it was logged in the console, so I thought it was an issue of ajax, but actually it was of the backend returning 404 when object was not found.
Many other users who are having the same problem and can’t find a solution on stackoverflow can get help or known cause from this.