2013-10-10 6 views

Antwort

12

Das funktioniert für mich.

ich eine neue Middleware

from social.apps.django_app.middleware import SocialAuthExceptionMiddleware 
from django.http import HttpResponse 
from social import exceptions as social_exceptions  

class MySocialAuthExceptionMiddleware(SocialAuthExceptionMiddleware): 
    def process_exception(self, request, exception): 
     if hasattr(social_exceptions, exception.__class__.__name__): 
      return HttpResponse("catched: %s" % exception) 
     else: 
      raise exception 

und fügen Sie es

MIDDLEWARE_CLASSES = (
    ... 
    'path.to.MySocialAuthExceptionMiddleware', 
    ) 
+0

settings.py, wenn das Problem in einem Ort nehme an, aber es wird hier erhöhen .. –