def send_validation(strategy, backend, code):
 if (not strategy.request.session.session_key):
  strategy.request.session.create()
 template = u'activation'
 if strategy.request.session.pop(u'password_reset', False):
  template = u'reset'
 url = u'{}?verification_code={}&id={}&type={}'.format(reverse(u'social:complete', args=(backend.name,)), code.code, strategy.request.session.session_key, template)
 send_notification_email(None, code.email, template, info=code.code, context={u'url': url})

def send_validation ( strategy , backend , code ) : if ( not strategy . request . session . session_key ) : strategy . request . session . create ( ) template = u'activation' if strategy . request . session . pop ( u'password_reset' , False ) : template = u'reset' url = u'{}?verification_code={}&id={}&type={}' . format ( reverse ( u'social:complete' , args = ( backend . name , ) ) , code . code , strategy . request . session . session_key , template ) send_notification_email ( None , code . email , template , info = code . code , context = { u'url' : url } )
sends verification email .