Make Django and AngularJS play nicely together
Been working a lot with AngularJS and Django recently. To make them play nicely together one of the first things you need to do in your Angular App is to enable CSRF support and send X-Requested-With header, do it like this:
1 2 3 4 5 6
Since now on, all modules services and controllers where $http service is used, will send requests with csrf token and 'XMLHttpRequest' header.