2013-10-10 11 views

risposta

12

Questo funziona per me.

creo un nuovo 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 

e aggiungerlo al settings.py

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

se supponiamo il problema in qualche luogo, ma intende sollevare qui .. –

Problemi correlati