def send_confirmation():
 form_class = _security.send_confirmation_form
 if request.json:
  form = form_class(MultiDict(request.json))
 else:
  form = form_class()
 if form.validate_on_submit():
  send_confirmation_instructions(form.user)
  if (request.json is None):
   do_flash(*get_message('CONFIRMATION_REQUEST', email=form.user.email))
 if request.json:
  return _render_json(form)
 return _security.render_template(config_value('SEND_CONFIRMATION_TEMPLATE'), send_confirmation_form=form, **_ctx('send_confirmation'))

def send_confirmation ( ) : form_class = _security . send_confirmation_form if request . json : form = form_class ( MultiDict ( request . json ) ) else : form = form_class ( ) if form . validate_on_submit ( ) : send_confirmation_instructions ( form . user ) if ( request . json is None ) : do_flash ( * get_message ( 'CONFIRMATION_REQUEST' , email = form . user . email ) ) if request . json : return _render_json ( form ) return _security . render_template ( config_value ( 'SEND_CONFIRMATION_TEMPLATE' ) , send_confirmation_form = form , ** _ctx ( 'send_confirmation' ) )
view function which sends confirmation instructions .