Skip to content

Instantly share code, notes, and snippets.

@pankaj28843
Created August 6, 2013 06:10
Show Gist options
  • Save pankaj28843/6162433 to your computer and use it in GitHub Desktop.
Save pankaj28843/6162433 to your computer and use it in GitHub Desktop.
Using SessionAuthentication of django-tastypie with AngularJS for POST/PUT/DELETE
'use strict';
angular.module('App', ['ng', 'ngCookies', 'ngResource']);
angular.module('App').run(function($rootScope, $http, $cookies) {
$http.defaults.headers.common['X-CSRFToken'] = $cookies.csrftoken;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment