def signin_success(request, identity_url, openid_response, redirect_field_name=REDIRECT_FIELD_NAME, **kwargs):
 openid_ = from_openid_response(openid_response)
 openids = request.session.get('openids', [])
 openids.append(openid_)
 request.session['openids'] = openids
 request.session['openid'] = openid_
 try:
  rel = UserAssociation.objects.get(openid_url__exact=str(openid_))
 except:
  redirect_to = request.REQUEST.get(redirect_field_name, '')
  if ((not redirect_to) or ('//' in redirect_to) or (' ' in redirect_to)):
   redirect_to = settings.LOGIN_REDIRECT_URL
  return HttpResponseRedirect(('%s?%s' % (reverse('user_register'), urllib.urlencode({redirect_field_name: redirect_to}))))
 user_ = rel.user
 if user_.is_active:
  user_.backend = 'django.contrib.auth.backends.ModelBackend'
  login(request, user_)
 redirect_to = request.GET.get(redirect_field_name, '')
 if ((not redirect_to) or ('//' in redirect_to) or (' ' in redirect_to)):
  redirect_to = settings.LOGIN_REDIRECT_URL
 return HttpResponseRedirect(redirect_to)

def signin_success ( request , identity_url , openid_response , redirect_field_name = REDIRECT_FIELD_NAME , ** kwargs ) : openid_ = from_openid_response ( openid_response ) openids = request . session . get ( 'openids' , [ ] ) openids . append ( openid_ ) request . session [ 'openids' ] = openids request . session [ 'openid' ] = openid_ try : rel = UserAssociation . objects . get ( openid_url__exact = str ( openid_ ) ) except : redirect_to = request . REQUEST . get ( redirect_field_name , '' ) if ( ( not redirect_to ) or ( '//' in redirect_to ) or ( ' ' in redirect_to ) ) : redirect_to = settings . LOGIN_REDIRECT_URL return HttpResponseRedirect ( ( '%s?%s' % ( reverse ( 'user_register' ) , urllib . urlencode ( { redirect_field_name : redirect_to } ) ) ) ) user_ = rel . user if user_ . is_active : user_ . backend = 'django.contrib.auth.backends.ModelBackend' login ( request , user_ ) redirect_to = request . GET . get ( redirect_field_name , '' ) if ( ( not redirect_to ) or ( '//' in redirect_to ) or ( ' ' in redirect_to ) ) : redirect_to = settings . LOGIN_REDIRECT_URL return HttpResponseRedirect ( redirect_to )
openid signin success .