python - Flask Secuirty Disable Password confirmation -


hi using python flask flask-security.

i want make users confirm emails not passwords.

it doesn't ask user enter in password , input confirm passwords matching.

instead asks user 1 password.

security_confirmable asks users required confirm email address when registering new account.

i want users confirm thier email not check if passwords matching on signup.

the registerform flask-security inherit confirmregisterform, passwordconfirmformmixin , nextformmixin. should import confirmregisterform , nextformmixin flask-security , define custom registerform inherit confirmregisterform , nextformmixin.

from flask-security import confirmregisterform, nextformmixin  class customregisterform(confirmregisterform, nextformmixin):     def __init__(self, *args, **kwargs):         super(customregisterform, self).__init__(*args, **kwargs)         if not self.next.data:             self.next.data = request.args.get('next', '') 

rewrite configuration of flask-security:

app["security_register_form"] = customregisterform 

Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -