[snowy] [django_piston] Make sync work with django 1.3



commit b34467c536b32a5c6c5bb9948ff07e28470be38d
Author: Jeff Schroeder <jeffschroeder computer org>
Date:   Sun Oct 9 18:59:29 2011 -0700

    [django_piston] Make sync work with django 1.3

 lib/piston/authentication.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/lib/piston/authentication.py b/lib/piston/authentication.py
index 8512f0f..4698174 100644
--- a/lib/piston/authentication.py
+++ b/lib/piston/authentication.py
@@ -12,8 +12,7 @@ from django.core.exceptions import ImproperlyConfigured
 from django.shortcuts import render_to_response
 from django.template import RequestContext
 
-#TODO: Update to proper 1.2 imports (once we drop 1.1 support)
-from django.contrib.csrf.middleware import csrf_exempt
+from django.views.decorators.csrf import csrf_exempt
 
 from piston import forms
 
@@ -177,6 +176,7 @@ def oauth_auth_view(request, token, callback, params):
     return render_to_response('piston/authorize_token.html',
             { 'form': form }, RequestContext(request))
 
+ csrf_exempt
 @login_required
 def oauth_user_auth(request):
     oauth_server, oauth_request = initialize_server_request(request)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]