コード例 #1
0
def signup():
    form = UserRegistrationForm()

    if form.is_submitted():
        hashed_password = generate_password_hash(form.password.data,
                                                 method='sha256')
        user_name = form.username.data
        domain = form.domain.data
        iroha_pvt_key, iroha_pub_key = create_users(user_name=user_name,
                                                    domain=domain,
                                                    pwd_hash=hashed_password)
        return '<h3>New user has been created!, your private key is: ' + str(
            iroha_pvt_key) + '</h3>'

    return render_template('signup.html', form=form)