Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the boilerplate code from the django docs to allow this to pick up... #73

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tomoconnor
Copy link

... a csrf token for django integration.

I noticed when using this with https://github.com/pinax/phileo that phileo uses eldarion-ajax, but out of the box, causes a HTTP 403 error because the AJAX request isn't sent with a CSRF token..
So I added the boilerplate ajax code from https://docs.djangoproject.com/en/1.7/ref/contrib/csrf/#ajax

HTH.

@paltman
Copy link
Contributor

paltman commented Oct 27, 2014

I would actually prefer this to be a separate include. We use pinax starter projects for all our work and as such we include the theme.js (https://github.com/pinax/pinax-theme-bootstrap/blob/master/pinax_theme_bootstrap/static/pinax/js/theme.js) in our base templates by default.

For those not using our starter projects, I think it's a good idea to pull this code you added into a csrf.js file and mention in the docs to include it if you are not already solving the csrf issue with another include in your project already.

Do you mind doing that?

  1. csrf.js
  2. documentation update about it

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants