Created
August 6, 2013 06:10
-
-
Save pankaj28843/6162433 to your computer and use it in GitHub Desktop.
Using SessionAuthentication of django-tastypie with AngularJS for POST/PUT/DELETE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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