pinax / pinax-likes

a liking app for Django
MIT License
158 stars 31 forks source link

HTTP ERROR 405 #58

Open HelloGit100 opened 5 years ago

HelloGit100 commented 5 years ago

Django 2.2.1

The steps are as follows:

put these html files in /home/www/venv/templates/pinax/likes/,

The console displays the following information:

Method Not Allowed (GET): /likes/like/14:13/ Method Not Allowed: /likes/like/14:13/ [29/May/2019 10:00:00] "GET /likes/like/14:13/ HTTP/1.1" 405 0

After clicked the icon, the console displays the following information:

Forbidden (CSRF token missing or incorrect.): /likes/like/14:13/ [29/May/2019 10:01:31] "POST /likes/like/14:13/ HTTP/1.1" 403 2513

What are the steps wrong? Thank you!

KatherineMichel commented 5 years ago

Not sure answer atm, but looks you had similar problem as @agiledesign2.

KatherineMichel commented 4 years ago

@HelloGit100 Did you end up finding a solution, or unresolved?

KatherineMichel commented 4 years ago

Hello @agiledesign2 has posted a solution to his issue. Perhaps, this would solve your problem as well: https://github.com/pinax/pinax-likes/issues/57

mikai-com commented 4 years ago

I added this to the html header to solve issue for me <script src="{% static "js/jquery.min.js" %}" >