@require_POST
def send_recovery_email(request):
 form = UserRecoveryEmailForm(data=request.POST)
 if form.is_valid():
  form.save(request=request)
  return redirect('users.recovery_email_sent')
 else:
  return HttpResponseBadRequest('Invalid request.')

@ require_POST def send_recovery_email ( request ) : form = UserRecoveryEmailForm ( data = request . POST ) if form . is_valid ( ) : form . save ( request = request ) return redirect ( 'users.recovery_email_sent' ) else : return HttpResponseBadRequest ( 'Invalid request.' )
send a recovery email to a user .