pinax/pinax-likes

405 Error

Closed this issue · 3 comments

Getting 405 Error when clicking on like buttons. Scanned through codes, not sure what I did wrong (if any).

Me too. Have been trying to debug it for a while now. Can't figure it out. Any ideas @eldarion or @paltman? Ever solve it @maxjang?

It's CSRF token protection. You are missing a js shim to take care of passing the token on ajax requests.

See: https://github.com/pinax/pinax-theme-bootstrap/blob/master/pinax_theme_bootstrap/static/pinax/js/theme.js#L17

Thanks for the response, @paltman! Turns out that wasn't my issue. I figured it out just now. I placed url(r'^likes/', include('phileo.urls')), in my URL patterns after a URL pattern with the regex r'^' which was catching the requests so the POST was never even making it to Phileo. Rookie mistake. Excited to start playing with Phileo now that I've got it working. Thanks for your work on it and sorry to bug you!