I would advise you to take a look at the Rails-backbone project . In particular, the backbone_rails_sync.js file .
Shows how this stone sends CSRF token data along with any ajax request you make to the server.
Also, here are a few docs in your Django project that give you an example of how to always override the jQuery default jQuery method, send the CSRF token.
updated based on comment:
So you are asking how to implement CSRF when using anything other than the REST API, and no views / forms are used in any way.
Answer: does not include CSRF protection .
- , () - .
, , ( ). - , , , - , - . , CSRF, , , , , CSRF .
, , HTTP API- , , Authorization header. , , CSRF.
, RESTful API :
- (https/ssl)
- , oAuth (2), API HTTP- ( , ).
- , , .